Over a million developers have joined DZone.

Semantic HTML Has Other Benefits

DZone's Guide to

Semantic HTML Has Other Benefits

· Web Dev Zone
Free Resource

Learn how to build modern digital experience apps with Crafter CMS. Download this eBook now. Brought to you in partnership with Crafter Software

Recently finished reading Our Pointless Pursuit Of Semantic Value at Smashing Magazine. It's a good read, and clearly spells out a true point: There is not a lot of value in wrestling over how semantic your code is for semantic's sake. I totally agree with this. While SEO and accessibility are often cited as reasons to pursue semantics, quite frankly, there is a lot of thought that semantics don't help as much as people think (examples of which the author notes.)

Does that mean that semantics are worthless, and you should just use a div and a span for everything? No, and I don't think that's what the author is saying.

Semantics means different things to different people, but I've always looked at it as the process by which I identify things in the markup. This identification is important because it's what I use to go back and manipulate things through CSS and JavaScript. In that way the process of making your HTML semantic is a lot like naming variables in more traditional programming.

So I see the new set of semantic options in HTML 5 as more choice, and I welcome it. Why? Because it makes it possible to turn this:

 <div id=“footer”>

into this:


It's not a huge differece, and doesn't change anything about the presentation, but does make it easier to read. So it allows me to write more easily understood and maintainable markup. Now that doesn't mean I arbitrarily use new tags. I do consider the meaning behind the tags when I use them. But not so much so that I allow myself to get paralyzed by it. Do I care that  address doesn't technically mean postal address? Not in the least. Do I care that dl might not be blessed to be used exactly the way I am using it. Nope.

It comes down to this, using Semantic HTML in the hopes of communicating to browsers and accessibility tools might have some diminishing returns. However using Semantic HTML to communicate to other developers can still yield a lot of value.


Source: http://www.terrenceryan.com/blog/post.cfm/semantic-html-has-other-benefits




Crafter is a modern CMS platform for building modern websites and content-rich digital experiences. Download this eBook now. Brought to you in partnership with Crafter Software.


Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}