Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>According to the specs:</p> <h2>CSS</h2> <blockquote> <p><a href="http://www.w3.org/TR/css3-selectors/#type-selectors">A <em>type selector</em> is the name of a document language element type written using the syntax of CSS qualified names</a></p> </blockquote> <p>I thought this was called the <em>element</em> selector, but apparently it is actually the <em>type</em> selector. The spec goes on to talk about <code>CSS qualified names</code> which put no restriction on what the names actually are. That is to say that as long as the type selector matches CSS qualified name syntax it is technically correct CSS and will match the element in the document. There is no CSS-specific restriction on elements that do not exist in a particular spec -- HTML or otherwise.</p> <h2>HTML</h2> <p>There is no official restriction on including any tags in the document that you want. However, the documentation does say</p> <blockquote> <p><a href="http://www.w3.org/TR/html5/dom.html#semantics-0">Authors must not use elements, attributes, or attribute values for purposes other than their appropriate intended semantic purpose, as doing so prevents software from correctly processing the page.</a></p> </blockquote> <p>And it later says</p> <blockquote> <p>Authors must not use elements, attributes, or attribute values that are not permitted by this specification or other applicable specifications, as doing so makes it significantly harder for the language to be extended in the future.</p> </blockquote> <p>I'm not sure specifically where or if the spec says that unkown elements are <em>allowed</em>, but it does talk about the <a href="http://www.w3.org/TR/html5/dom.html#htmlunknownelement">HTMLUnknownElement</a> interface for unrecognized elements. Some browsers may not even recognize elements that are in the current spec (IE8 comes to mind).</p> <p>There is a <a href="http://www.w3.org/TR/2013/WD-custom-elements-20130514/">draft for custom elements</a>, though, but I doubt it is implemented anywhere yet.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload