Write Semantic HTML
Posted by Matt Johnson | 2007-07-01 22:31:00
For years I wrote crappy HTML. I used <div>s and <span>s for just about everything. Fortunately, the good people at the Webmaster Forums helped me kick that habbit. Why is semantic HTML markup the best way to go?
Change Formatting Easily
If you wrap all definition terms on your website in <dfn>s you can change the color of all definition terms without changing HTML. If you had used <em>s for all them, you would have to go back and assign all those definition terms a CSS class. That little tip would have saved a client a lot of money if their previous web developer did it.
Cleaner Code
There are more than one hundred HTML tags, USE THEM. Instead of writing something like <p class="heading"> you could have just used <h1> or <h2>. Same goes for quotes (<blockquote>), and a dozen other tags. Having all those attributes makes your code ugly, and your source code public ;)
Ok, I can't think of any more reasons right now, but your should really code semantic HTML for the first reason I listed. You'll wish you had when you're going through 100's of files changing the formatting on a little element on the page
