+ 3

<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

17th Apr 2017, 8:08 PM
Thanh Le
Thanh Le - avatar
2 odpowiedzi
+ 4
Did you try to make an html code without the head tag?
17th Apr 2017, 8:19 PM
Manual
Manual - avatar
+ 3
this is just a general way of saying. Also, everybody uses html, head and body
17th Apr 2017, 8:15 PM
Welliton Malta
Welliton Malta - avatar