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

This is specifically elements which are allowed in the `head` element of the document.

I recently read somewhere that for backwards compatibility reasons no new element types can be added within `head`. This causes a lot of overloading on the existing ones for elements like <link />.

I don't have any supporting evidence though.



The HTML syntax lets you omit the </head> tag. Any start tag not in the finite list of elements will implicitly start the body and go there.

    <html>
    <head>
    <title>I am in the head</title>
    <foo>I am in the body!</foo>
    </head>   <- this is a parse error and is ignored


HTML even lets you omit the <html> and <head> tags, so the following is valid and equivalent:

    <title>I am in the head</title>
    <foo>I am in the body</foo>
I've described how this works for SGML here [1], but it also applies to HTML.

[1]: http://sgmljs.net/docs/sgml-html-tutorial.html (see slides linked from TALK)


Screw it, let's abandon all markup and content: https://mathiasbynens.be/demo/css-without-html

(Explanation: https://css-tricks.com/using-css-without-html/ )


I havent heard of that but looking through RFCs might be the way to find out.




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

Search: