Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hmm, no HTML tag, if you view source of http://info.cern.ch/hypertext/WWW/TheProject.html


The HTML spec allows omitting <html>, <head>, and <body>, under certain circumstances. See https://html.spec.whatwg.org/#syntax-tag-omission for the exact rules.

(Not that that page validates with a modern HTML standard, but it doesn't fail for that particular reason.)


I wouldn't think you really need an <html> tag, provided the server has specified the right Content-Type.

Heck, given that you can set stylesheets using the Link HTTP response header rather than the <link> tag, you can skip the separation of <head> and <body> for simple pages as well. Just start with what would go inside the body, and then the <head> ends up where it belongs—in the headers. ;)




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: