Semantic markup gives Web documents meaning
Published 16 years ago by James Simmons
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.
Citations
About the author
Trackback URL for this entry:
http://www.semanticfocus.com/blog/tr/id/283742/
Spam protection by Akismet
Post a comment
Recently Commented Blog Entries