News for hackers. Stuff that matters.
Re:A few HTML tips by YngwieMalware on Wednesday August 24, 2016 @09:13AM (#12351733)
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.
Re:A few HTML tips by FroshKiller on Wednesday August 24, 2016 @10:01AM (#12352051)
A simpler way to say "more semantically correct" is "correct." Please don't trivialize the importance of semantics. Proper semantic representation makes documents more accessible.
Re:A few HTML tips by cloverich on Wednesday August 24, 2016 @10:19AM (#12352196)
I 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?
Re:A few HTML tips by throwanem on Wednesday August 24, 2016 @10:23AM (#12352220)
Take a look at 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.
Re:A few HTML tips by FroshKiller on Wednesday August 24, 2016 @10:56AM (#12352481)
Sorry, I should've provided a reference for you. The link throwanem posted is a good introduction with an interactive demonstration.
Re:A few HTML tips by rocky1138 on Wednesday August 24, 2016 @10:19AM (#12352188)
Do you have any documentation for this? This part of the article is what stood out for me, too.
Re:A few HTML tips by throwanem on Wednesday August 24, 2016 @10:22AM (#12352212)
The relevant section of the standard: https://www.w3.org/TR/html5/sections.html#the-h1,-h2,-h3,-h4... - 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/ .

Re:A few HTML tips by rocky1138 on Wednesday August 24, 2016 @10:48AM (#12352416)
I see. For the longest time I've been using <h2> as a sub-title. I guess I'll have to stop that. Thanks!
Re:A few HTML tips by throwanem on Wednesday August 24, 2016 @10:51AM (#12352441)
You are most welcome!
Re:A few HTML tips by FroshKiller on Wednesday August 24, 2016 @10:57AM (#12352490)
Sorry again, I should've provided a reference for you. The link throwanem posted is very good.
Re:A few HTML tips by nommm-nommm on Wednesday August 24, 2016 @11:34AM (#12352767)
I think it also make the HTML easier to read.