Why they're closing head tag after body tag? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why they're closing head tag after body tag?

I don't know why but i have seen in many places </head> tag is written after closing body tag and i have read that close head tag before starting body.

5th Dec 2016, 5:25 AM
Md. Sayanur Rahman
Md. Sayanur Rahman - avatar
3 Answers
+ 2
That's a mistake, closing head before body starts is the correct way.
5th Dec 2016, 5:34 AM
Maik Lindner
Maik Lindner - avatar
+ 1
<html> <head> <!--You can define css & js file here--> <link rel="stylesheet" type="text/css" href="asset/css/style.css"/> <script src="asset/js/main.js"><script/> </head> <body> <!--This is your web content--> <h1>Lorem ipsum dolor sit amet</h1> </body> </html>
5th Dec 2016, 7:00 AM
Fendi Septiawan
Fendi Septiawan - avatar
0
but the program gets executed even
5th Dec 2016, 7:43 AM
Md. Sayanur Rahman
Md. Sayanur Rahman - avatar