<head> and <html> tag mandatory for being valid HTML-file? | Sololearn: Learn to code for FREE!


<head> and <html> tag mandatory for being valid HTML-file?

In one of the HTML challenge question it was asked whether which tags are needed for being a valid HTML file. The accepted answers were <html> and <head>. I think this is not quite correct. Because since HTML5 it is allowed to omit the <head> and <html> (and also the <body>) tags. Sources: https://www.w3schools.com/tags/tag_head.asp http://stackoverflow.com/questions/5641997/is-it-necessary-to-write-head-body-and-html-tags

4/17/2017 8:08:42 PM

Thanh Le

2 Answers

New Answer


Did you try to make an html code without the head tag?


this is just a general way of saying. Also, everybody uses html, head and body