4 ms·
A lot of it is semantics. A bunch of HTML5 is semantic vs. actually having different behavior. <header> behaves no differently than <div id="header"> but is mor
by YngwieMalware 10y ago
A lot of it is semantics. A bunch of HTML5 is semantic vs. actually having different behavior. <header> behaves no differently than <div id="header"> but is more semantically correct.
- FroshKiller 10y agoA simpler way to say "more semantically correct" is "correct." Please don't trivialize the importance of semantics. Proper semantic representation makes documents more accessible.
- cloverich 10y agoI don't find the header, article, section, etc tags to be sufficiently clear that they are always used in the same way by different people. But maybe I'm missing something -- how do they improve accessibility?
- throwanem 10y agoTake a look at http://accessiblehtmlheadings.com/ http://accessiblehtmlheadings.com/ for a pretty solid introduction. The tl;dr: is that, used properly, they enable screen readers and similar to identify document structure and make it more easily navigable.
- FroshKiller 10y agoSorry, I should've provided a reference for you. The link throwanem posted is a good introduction with an interactive demonstration.
- rocky1138 10y agoDo you have any documentation for this? This part of the article is what stood out for me, too.
- throwanem 10y agoThe relevant section of the standard: https://www.w3.org/TR/html5/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements https://www.w3.org/TR/html5/sections.html#the-h1,-h2,-h3,-h4... - https://www.w3.org/TR/html5/sections.html#headings-and-sections https://www.w3.org/TR/html5/sections.html#headings-and-secti... expands on this somewhat further. For a considerably more detailed treatment with special attention to concerns around accessibility and some information on other document elements with similar significance, take a look at http://accessiblehtmlheadings.com/ http://accessiblehtmlheadings.com/ .
- FroshKiller 10y agoSorry again, I should've provided a reference for you. The link throwanem posted is very good.
- nommm-nommm 10y agoI think it also make the HTML easier to read.