In other words, our first concern is making things easy to change. The semantic web (at least some of it) just isn’t there yet.
I’ll finish by saying, that there are certain semantic elements that are safe to use. In that case, by all means.
41–50 of 191 posts
In other words, our first concern is making things easy to change. The semantic web (at least some of it) just isn’t there yet.
I’ll finish by saying, that there are certain semantic elements that are safe to use. In that case, by all means.
I've never understood the purpose of "semantic" html. It seems to be bandied about as some sort of unquestioned good, but why? If the code is easy to understand who cares that the "correct" tags have been used? Obviously there are some benefits for screen readers and search engines, but these uses should be explicitly checked for as part of a QA process instead of relying on some vague standard of semanticness.
Honestly, there isn't, except for a small subset related to screen readers. At one point there was a kind of hope that semantic tags would make web content easily machine-parseable, unlocking a bunch of meaningful content reuse somehow that better semantics would make possible. (Big data, ML and all that.) The two canonical examples being that lists were important so software could extract meaning from list items, an…
Don't get me wrong, I used to write as semantic HTML as I could; nav for navigations, table for table's, aside for well asides, etc as the author suggests, but ultimately it just really doesn't matter. nav and div render exactly the same. In fact, I find zero value in using ul/li's for lists that aren't bulleted. I know it's an unordered list of items, but really, what _is_ the value in writing semantic HTML if the d…
> I find zero value in using ul/li's for lists that aren't bulleted Browsers don't care. You may not care either. But people with disabilities attempting to make sense of your website do, very much so. There's absolutely no reason __not__ to use semantic HTML, and many reasons to do so.
I've never understood the purpose of "semantic" html. It seems to be bandied about as some sort of unquestioned good, but why? If the code is easy to understand who cares that the "correct" tags have been used? Obviously there are some benefits for screen readers and search engines, but these uses should be explicitly checked for as part of a QA process instead of relying on some vague standard of semanticness.
I've never understood the purpose of "semantic" html. It seems to be bandied about as some sort of unquestioned good, but why? If the code is easy to understand who cares that the "correct" tags have been used? Obviously there are some benefits for screen readers and search engines, but these uses should be explicitly checked for as part of a QA process instead of relying on some vague standard of semanticness.
Honestly, there isn't, except for a small subset related to screen readers. At one point there was a kind of hope that semantic tags would make web content easily machine-parseable, unlocking a bunch of meaningful content reuse somehow that better semantics would make possible. (Big data, ML and all that.) The two canonical examples being that lists were important so software could extract meaning from list items, an…
In which current screen readers is that statement true? (I'm fairly sure the answer is "none", but ...)
Instead of a border I tend to have a debug helper that adds a 1px outline of cyan or pink. To get the “bones” of a component or page. Good advice. Definitely sounds like captain obvious but it’s also something I think needs to be said.
javascript:(function(){Array.from(document.body.getElementsByTagName('*'), e => e.style.outline = '2px dotted orangered');})();I've never understood the purpose of "semantic" html. It seems to be bandied about as some sort of unquestioned good, but why? If the code is easy to understand who cares that the "correct" tags have been used? Obviously there are some benefits for screen readers and search engines, but these uses should be explicitly checked for as part of a QA process instead of relying on some vague standard of semanticness.
Honestly, there isn't, except for a small subset related to screen readers. At one point there was a kind of hope that semantic tags would make web content easily machine-parseable, unlocking a bunch of meaningful content reuse somehow that better semantics would make possible. (Big data, ML and all that.) The two canonical examples being that lists were important so software could extract meaning from list items, an…
It absolutely does. Try firing up a screen reader before you make such comments spreading misinformation.
For example, it's maddening to see people now making tables out of flexbox grids and such. In a screen reader you can navigate a in two dimensions (rows and columns). The flexbox variety completely breaks navigating up/down columns.
Earlier quoted context omitted.
> I find zero value in using ul/li's for lists that aren't bulleted Browsers don't care. You may not care either. But people with disabilities attempting to make sense of your website do, very much so. There's absolutely no reason __not__ to use semantic HTML, and many reasons to do so.
Are you suggesting you can't write accessible Web applications without using semantic HTML?
I've never understood the purpose of "semantic" html. It seems to be bandied about as some sort of unquestioned good, but why? If the code is easy to understand who cares that the "correct" tags have been used? Obviously there are some benefits for screen readers and search engines, but these uses should be explicitly checked for as part of a QA process instead of relying on some vague standard of semanticness.
I look at 'div soup' HTML and shudder. The authors of it have not got a clue. They also make it hard for people who do write proper HTML with the correct tags, styling the elements and keeping the separation of concerns to do anything with it.
It is about organising your content, if everything is in div tags you might as well just upload JPGs of your web pages, with different ones for desktop and mobile.
Another game changer is CSS grid. You no longer need wrapper divs to do very basic tasks such as centering content. In fact content with horrible divs everywhere is a nightmare to style up with CSS grid.
An example of this is a basic form. With just the form elements and labels you can get it looking sweet in next to no time with CSS grid.
However, if some zombie has put lots of spans and divs around the form elements and done the labels wrong then you have to choose either to rebuild the backend thing that churns out the form or just style it up lame block layout style.
Pseudo selectors are also cool, there is no need to have silly 'i' elements and spans to put that asterisk after 'required'.
Some people like to keep it simple, doing HTML properly, others want to pootle along with their divs and class attributes. I know what will look good in ten years time and what will look outdated.
HTML5 introduced many features but the main course was the semantic elements. You can and you should write web pages with these elements and also be thinking in terms of them.
You may scorn the accessibility aspect but accessibility is easy if you use the right elements. Why would you not want to have it? There is also the mindset that goes with it - the web is for everyone, not just rich, white, English speaking males with perfect eyesight.
The article is spot on and extremely well said. Styling elements rather than make believe classes is particularly well said.
I would say that people who create div soup HTML should be banned from the internets, the work practices of overly complicating everything has been going on for too long.
I don't even regard div soup web pages as proper web pages, it is like comparing beige deep-fried processed food with freshly prepared from ingredients food.
Earlier quoted context omitted.
> I find zero value in using ul/li's for lists that aren't bulleted Browsers don't care. You may not care either. But people with disabilities attempting to make sense of your website do, very much so. There's absolutely no reason __not__ to use semantic HTML, and many reasons to do so.
Are you suggesting you can't write accessible Web applications without using semantic HTML?
That doesn't mean you can't write accessible web applications without semantic HTML, but it does mean you have to spend time adding the accessibility after the fact.