About the head part of html | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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!

27th Jan 2019, 9:41 PM
Jython
Jython - avatar
1 Resposta
+ 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!
27th Jan 2019, 11:31 PM
Rowsej
Rowsej - avatar