Semantic Web

Over the years I've heard the phrase "semantic web" tossed around the Internet via blog posts, how-tos, and podcasts.  Even though I saw the phrase several hundred times, it just went right on by.  I mean, I know what the words say, but it actually hit home until the other day.  I was writing some angle brackets and all of a sudden I had an epiphany.

First, a quick definition of sematic courtesy of Wiktionary:

semantic: Of or relating to semantics or the meanings of words.

The application of this word to (x)html signifies defining meaning to your content. You see, (x)html is a document markup language.  It's grown over the years to accommodate changes in the web.   Some of the changes over the years have been good (like the new elements in html5) and some haven't been so good (the blink and marquee tags come to mind here). What we've been moving towards is a more clear separation of content(xhtml), design(css), and interaction(javascript).

The easiest way for me to explain semantic html is to talk about a few deprecated tags and their newer, more meaningful counterparts:

courtesy of Jesper Rønn-Jensen

courtesy of Jesper Rønn-Jensen

  • <b> is for bold.  Boldness is a visual characteristic, not a meaning. This element has been deprecated in favor of <strong>.  Even though strong is more verbose, it's easy to see in markup that this thing is important.  It's up to the designer to determine how strongness gets visualized.  It could be bold.  It could be red.  It could be red and bold.  Who cares?  Leave that to the designer. For the content creator, all that should matter is that it's important.
  • <i> is for italic.  Once again, italic is a visual style.  This element has been deprecated in favor of <em> or emphasize.  I guess emphasize is a little too long for the w3c, so I just imagine the full word is still there.  Emphasis bears more meaning than italicize.  The designer might want to emphasize you emphasis by making it 20pt comic sans with green text on a purple background.  Leave that to the designer.

You may be reading this with a "Well Duh" feeling, and that's fine.  What I'm saying isn't earth shattering.  This is just my reminder why I don't want to litter my markup with something silly like a "left" and "right" class.  If I start to want to go that direction, I just ask myself: "Self, why do you want that element floated to the right of the screen?"  Once I have that answer, I have a better class name that bears more meaning.

No comments yet. Be the first.

Leave a reply