From the monthly archives:

May 2008

A Brief Introduction to Semantic HTML

by Rick on May 15, 2008

bricks

About eight years ago, I was in charge of putting together a website for a group of gamers with whom I was friends. In those days, when we wanted to say something with emphasis on the site, we’d bust out with B. And it made perfect sense, after all… B = bold! Simple, elegant.

Little did I know at the time that I really wasn’t emphasizing the text to which I was applying B. Here’s what I mean by that:

When you speak, listen to your voice as you emphasize important details or stress a point to your listeners. The style of your voice certainly does change. However, the meaning of what you said was slightly altered. The stylistic change to how you said certain words added inflection which wouldn’t have been present otherwise.

You see, there’s two aspects of what we say: style and semantics. How our words sound is the style and what they mean or how they are used is the semantics.

The same is true with what we write on the Web. As I said before, B was good for one thing: making text bold. It did that well, and for sighted visitors, the text certainly did appear emphasized.

But what about those visitors who browsed using a text-to-speech reader? B doesn’t provide any semantic meaning which could be translated into an accurate verbal reading. Further, because of B’s lack of meaning, the text which appears emphasized to sighted users appears as plain ol’ ordinary text to search engine robots.

The bottom line is, by using B as your emphasizer, you are wasting your time; you merely give the illusion of emphasis while the text itself is semantically no more or less important than the surrounding words.

The solution rests in a much more semantic tag called STRONG. This tag — one of several “phrase tags” which (X)HTML provides — goes beyond B by actually altering and enhancing the meaning of the text.

No longer would text-to-speech readers speak through B-wrapped words with unwavering tone. No longer would important B‘ed keywords receive the same importance in search engine calculations.

With STRONG and other semantic tags, the enhanced meaning of the text will be evident to text-to-speech readers, which is an important aspect of usability.

Of course, the differences go far beyond B versus STRONG:

  • Instead of I (i.e., <em>italic text</em>), use EM (i.e., <em>emphasized text</em>).
  • Instead of using BLOCKQUOTE to indent text, use it only for actual quotations. For indentation which doesn’t require a change in meaning, try applying style to your paragraph or division tags.
  • Instead of rendering code like <span style="font-family: monospace;">some code</span>, use the CODE tag (i.e., <code>some code</code>).
  • When no semantic element seems available for what you want to do, there are two rather generic elements available: DIV and SPAN. A DIV represents a division of a page’s content; for instance, DIVs may be used to separate the various parts of a basic blog page: header, content, comments, sidebar, footer. A SPAN denotes, well, a span of text but is instead an inline element. An example of how I use SPAN is to make up for the lack of any semantic element to refer to the title of something (whether a movie, book, ship, or anything else which is typically underlined when hand-written); I created a class called TITLE in my style sheet and applied an italic style to it. It’s unfortunate that the semantic meaning of “this is a title” cannot be applied, but at the very least, the text is set apart and visually differentiated. An example of this would look like, “When it comes to captains of the <span class="title">Enterprise</span>, Picard takes the cake.”

I hope I haven’t made this introduction overly complex, but I hope I have included enough to get the beginner blogger started in more creative and semantic uses of all the code the Web allows us to use.

I will close with a warning: Just as it was a mistake to misuse the old school style elements to add meaning to a Web page, so it is also a mistake to use the new school semantic elements to add style to a page. If there is something on a page which needs to be bold (perhaps a symbol which doesn’t show up well enough by default), don’t wrap it with STRONG just for its default visual effect — does the symbol really need to be emphasized for blind readers? No, instead you should use the fallback element of SPAN in a manner similar to this: <span class="bold">text to be bold but *not* emphasized</span>.

Ultimately, your markup should contain only semantic and structural elements; if someone were to view your site without any styles applied to it, the semantic and structural tags should be enough to still convey your thoughts. All the fancy style definitions should be stored externally in a style sheet.

It takes some getting used to in order to speedily write for the Web with semantics in mind, but it is worth it. The payoff is not only a more meaningfully coded site, but your code will almost always be cleaner and more readily understood.

Further Reading

{ 0 comments }

A Whole Bunch of Dorcases

by Rick on May 15, 2008

Leaders get the limelight, the book deals, and the wide-eyed acolytes, but the kingdom of God is innervated by unsung heroes. Anyone serious about seeing new churches grow would give his right arm for people like Dorcas. AJ Vanderhorst

{ 0 comments }

Now Known as “Kingdom Geek”

by Rick on May 14, 2008

Several months ago, I spent a good deal of time attempting to come up with a name which reflected my personality, my values… A name which I could give this blog (which at the time was known simply as “RickBeckman.org”) that would let visitors know what it was about without using my own name as an identifier. Not that my name isn’t good or anything, but that it’s my name, not necessarily my blog’s.

And I like the name “Kingdom Front,” but after having lived with it for some time, I’ve decided that I was only 50% right in choosing that name. An increasing number of posts here aren’t about the intersection of Scriptures & life at all but are instead about programming or some other geeky thing.

So with that in mind, I came up with what i think is the ideal solution: Kingdom Geek.

You don’t have to like it, though I hope you do, but I feel it best represents what I do here. I’m a Christian, I’m a geek, and so far as I can tell, the name hasn’t yet been taken. I was able to register KingdomGeek as my new Yahoo screenname even, which is exciting — good names are hard to register on Yahoo anymore. Feel free to add me to your contact list, if you’d like.

The name change may not be done in a thorough fashion; “Kingdom Front” may still be referenced in all sorts of places that will take a while to update. If you link here, would you be kind enough to update your links to reflect the new name? (Also, don’t link to me as “The Kingdom Front”; I’m just one geek among many within the Church, and I’m not claiming to be the geek in Jesus’ camp. “Kingdom Front” without any articles is just fine with me. :-)

What do you think? Like the new name? Or hate it?

{ 7 comments }

That Hell-and-Damnation Stuff

by Rick on May 11, 2008

The best religious inspiration is humor, not the hell-and-damnation stuff. Barb (or is it Mary?)

Religion might thrive on ear-pleasing humor; the same can never be said of true Christianity, for the source of our faith spoke a great deal about Hell & damnation. If we are being honest in fulfilling the Great Commission, teaching believers all that Jesus has taught us, then our message should be quite full of “the hell-and-damnation stuff.”

{ 8 comments }

Salacious Sexual Sermon Series

by Rick on May 8, 2008

It is not uncommon for me to come across a couple of Web pages each week showcasing churches which are using sermon series on various sex-related subjects in a propagandist move to fill their seats; usually, these pages showcase such churches by pointing out how “idolatrous” such sermon series are, how we ought to preach Christ and only Him crucified.

Fair enough, but did Christ not say that the preaching and believing of the Gospel was just the beginning, that discipleship ought to take place, that all which He has taught should be communicated to others? Did Paul not state that the whole of Scriptures was profitable for edification?

I agree that using propagandist tactics to stir up controversy and attract the unsaved into churches is a stupid move; I disagree that elders should not be teaching the flock about sex — the dangers and the joys thereof. In teaching the whole counsel of God, are they just to skip the Song of Solomon, or is there an unwritten rule that they cannot teach that book without hyper-spiritualizing everything into referring to either Yahweh & Israel or Christ & the Church?

If elders aren’t teaching the flock about sex (and if the flock are in turn not passing the same values to their children), who do you think is going to be teaching them about it?

Something to think about.

{ 2 comments }