Discount !! E-commerce App With Backend Source Code Video and Voice Chatting App Firebase Chatting App Source Code Complete Gym App BLoC State Management Source Code Complete Study App Buy Ticket Booking App Source Code Payment App Buy Travel App With Backend Source Code Complete Chat App Udemy Course Special Offer Online Learning Course App (BLoC)
The above error happens due to many reasons we get Uncaught TypeError: Cannot read property 'children' of null.
Now first you need to check if your document Id which you get through document.getElementById() is correct. This string must be correct one.
It's same for the querySelector.
One big reason it happens due to DOM object is not ready, which means your document ID doesn't exist in the DOM at the moment of execution of this code.
So move it to the right place and don't put in the <head></head> tag section.
Try copying your
<script>code</script> right before the