HTML5 Zone is brought to you in partnership with:

I'm a Worldwide Developer Evangelist for Adobe. My job basically entails me traveling the world and talking about the developer tools and technologies that Adobe has to offer or that we support. I'm also the author of Driving Technical Change. It's about convinving reluctant co-workers to adopt new tools and techniques. Terrence is a DZone MVB and is not an employee of DZone and has posted 40 posts at DZone. You can read more from them at their website. View Full User Profile

Semantic HTML Has Other Benefits

12.09.2011
| 2854 views |
  • submit to reddit

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>
  </div>
 </div>
 <div id=“footer”>
 </div>
</body>

into this:

   </div>
  </article>
 </div>
 <footer>
 </footer>
</body>

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

 

 

 

Published at DZone with permission of Terrence Ryan, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)