+ 1
About the head part of html
So Iâm doing the html course and it says head is where the non-visual elements go. Does this mean like the JavaScript to make a button function is in there? Donât make the reply too complicated please as Iâm just starting. Thanks!
1 Answer
+ 4
Iâll try to make my answer simple. The head element contains all the non-visible elements, that provide other metadata about the web page. For example, the title, and external files to be loaded BEFORE the actual document (thatâs why itâs before the body element). So you can attach your JavaScript in there, but be aware that the document hasnât fully loaded yet, so you wonât be able to manipulate elements from the DOM (youâll learn about that later on). But yes, you can do that!