Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <ul> <li>First there’s the layer of validity corresponding to “parse errors” in the <a href="http://www.whatwg.org/specs/web-apps/current-work/#parsing" rel="noreferrer">HTML5 parsing algorithm</a>. This layer is similar to XML well-formedness. The foremost reason to avoid having errors in your documents on this layer is that you may get a surprising parse tree. If your document is error-free on this layer, you get fewer suprises to debug when writing JS or CSS that works with the DOM.</li> <li>As a special case of the above-mentioned layer, there’s the HTML5 doctype: <code>&lt;!DOCTYPE html&gt;</code>. The reason why one would want to comply here is getting the standards mode in the easiest way possible. It’s something you can memorize unlike the HTML 4.01 or XHTML 1.0 doctypes you need to look up and copy and paste each time. Of course, the reason why you’d want the standards mode is fewer surprises on the CSS layer.</li> <li>The main reason to care about validation on the layer higher than the parsing algorithm is catching your typos so that you spend less time debugging why your page isn’t working like you are expecting.</li> <li>The previous point does not explain why you should care about validation when a given element or attribute that you did not misspell is supported by browsers as a matter of legacy but the HTML5 spec still shuns it. Here’s why HTML5 has obsoleted syntax like this: <ul> <li>HTML5 uses obsoletion to signal to authors that some features are a waste of their time. These include <code>longdesc</code>, <code>summary</code> and <code>profile</code>. (Note that people disagree on whether these are, indeed, waste of time, but as currently drafted, HTML5 makes them obsolete.) That is, if you have limited resources to improve accessibility, your limited resources are better spent on something other than <code>longdesc</code> and <code>summary</code>. If you have limited resources for semantic purity, your resources are better spent on something other than making sure you have the right incantation in <code>profile</code>.</li> <li>HTML5 obsoletes some presentational features that can be duplicated in CSS to guide authors to use CSS for their own good. This way, authors who don’t consider maintainability on their own are supposed to be guided to more maintainable code nonetheless. Personally, I’d prefer making more of the legacy presentational stuff conforming and leaving it to authors themselves to decide which way of doing things works for them.</li> <li>Some things are obsoleted for political reasons. The <code>&lt;font&gt;</code> element is obsoleted, because making it conforming would make anti-<code>&lt;font&gt;</code> standardistas think that the HTML5 people have gone crazy, which could lead to bad PR. <code>&lt;applet&gt;</code> is obsoleted mainly as a matter of principle of not giving special markup to one particular plug-in. The <code>classid</code> attribute on <code>&lt;object&gt;</code> is obsoleted, because it’s in practice ActiveX-specific.</li> <li>Some things are obsoleted on the basis of language design aesthetics. This includes the <code>name</code> attribute on <code>&lt;a&gt;</code> and the <code>language</code> attribute on <code>&lt;script&gt;</code>.</li> </ul></li> </ul> <p>(I develop the Validator.nu HTML5 validator which is also the HTML5 validation engine used by the W3C validator.)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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