'getElementByTagName is not a function when i open my index.html file [closed]

enter image description here

When I open my HTML file I get this error. How to fix it and why am I getting it?



Solution 1:[1]

There is a typo in getElementsByTagName, in your case, it's written without s in the middle.

There was a same question asked and replied here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Aziza Kasenova