Joy Of  Code - Web Design Training and Consulting
Joy Gems Newsletter

The Purpose Of (X)HTML

By Bud Kraus
bud@joyofcode.com
Joy Of Code
Creator And Instructor

v4 i6
Originally Published: April 17, 2008

I've grown accustomed to telling my web design students that (X)HTML is invisible. They must think I'm crazy. What do you mean you don't see (X)HTML (Extensible Hyper Text Markup Language or Hyper Text Markup Language)?

Just what do I mean when I say that (X)HTML is something which is not seen?

(X)HTML is responsible for the structure of a web document, that is, it gives meaning to content (largely consisting of text copy). That's it. Nothing more but nothing less.

Think about this. What do headings, paragraphs, lists, data tables and links look like? They don't have a look. Those structures (headings, etc.) are only about giving purpose, semantics, meaning to your copy.

Web document structure is much like grammar, without which words would be strung together and not given a context.

Headings are headings because they identify a phrase which summarizes the words that follow it. Headings are not blue or large or arial or anything which has style. Paragraphs are paragraphs because they group sentences together in some meaningful manner and hold those sentences apart from other paragraphs. Paragraphs don't have color, font style and margins around them. All they have is purpose.

What about lists? Same thing. They just organize related fragments of copy.

This is why I go a little nutso when my students, working with (X)HTML (and not Cascading Style Sheets) say, "I don't like the way it looks." No doubt I return the "nutso-ness" back when I tell them, "Who cares what it looks like? (X)HTML has no looks, it's invisible."

Still not convinced that (X)HTML is invisible? Ok, ask yourself, "What does a <div> tag look like on a web page?" It looks like nothing. "What does a <div> tag do?" It groups paragraphs and other content into some kind of structure to which CSS can be applied. In and of itself, it has no visible appearance. Same can be said of <span>, <tbody>, <tfoot> and all of (X)HTML for that matter. It has purpose but it has no style, and because of that (X)HTML is not visible.

Why does this matter? Understanding the purpose of (X)HTML in web design is the first step towards creating a web page whose structure is kept separate and apart from its style.

Trust me. That's exactly what you want to do!!