JAN 8th 2007

Let's face it, Web documents in their current state are just about the worst way we exchange data. It usually comes in the form of HTML or XHTML, and rarely validates to any degree. In order to begin our approach towards Tim Berners-Lee's dream of the Semantic Web we must begin writing valid, semantic markup.

What does it mean for markup to have semantic meaning?

To have semantic meaning an element must represent a concept. Whether that concept is a paragraph, header, code, abbreviation, or a citation, there are many XHTML elements that represent familiar concepts that are accessible today and onto tomorrow.

An example of an element with semantic meaning is the paragraph <p> element. The <p> element indicates that the selection of text (and other markup) is part of a paragraph; similar to how we write on a piece of paper (after all, a document is a document).

Another example would be the header <hx> tags (where x is replaced by the header level 1-6). The <hx> tags are headers of sections, paragraphs, or other markup. The semantics of XHTML tend to follow a document-like theme.

An example of markup that does not have semantic meaning is the <span> and <div> elements. The W3C describes them as:

"The DIV and SPAN elements, in conjunction with the id and class attributes, offer a generic mechanism for adding structure to documents. These elements define content to be inline (SPAN) or block-level (DIV) but impose no other presentational idioms on the content."1

It is preferable to use elements with semantic meaning over generic containers.

In conclusion

While semantics in markup will probably not eliminate the need for specialized markup languages like RDF, marking-up your documents with valid XHTML is the best and easiest step in the right direction.


1 http://www.w3.org/TR/html401/struct/global.html#h-7.5.4

About the author

James Simmons

It's my goal to help bring about the Semantic Web. I also like to explore related topics like natural language processing, information retrieval, and web evolution. I'm the primary author of Semantic Focus and I'm currently working on several Semantic Web projects.

Trackback URL for this entry:


Spam protection by Akismet

Comments for this entry:

No one has left a comment for this entry. Be the first!

Post a comment

  1. Spam protection by Akismet