The Semantic Web
Thursday, December 18, 2003 at 6:24 pm | Comments off
I've come to the conclusion that very few people write semantic markup, or even know how to. Sadly, this is often true even when the designer is using a CSS based design. This is, I am sure, a result of the shoddy markup needed in legacy browsers. Many books claiming to teach web design/HTML do not even cover the issue of writing semantic markup, but instead revert back to the ugly void that is presentational markup. Markup has one purpose - to structure one's documents, and it is becoming much more important to realize this with XHTML.
So, what is semantic markup? Semantic markup is markup that is used to correctly convey the document structure. Heading tags (
<h6>) should be used to markup headings, not create "large, bold text." Paragraphs should be marked with
<i> tags have little use, as they convey nothing structurally, but are rather used to create bold or italic text, respective - a task best left to CSS. A better alternative would be the
<em> tags, as they do convey structural meaning. If you have a
<h2> without a
<h1>, you probably did something wrong. Likewise, if you have multiple
<br />s in a row, you probably did something wrong. Each tag that you use should have a semantic meaning - this should be kept in mind when one is structuring their documents.
Semantic markup has many benefits, including accessibility, search engine optimization, and page weight. Take a look at the source of a well structured site and you'll probably immediately notice it's clean, concise source code. Add to that the ability to pass XHTML as an application of XML, and you have yet another reason to use semantic markup.
Comments are automatically closed after 45 days