The Four Pillars of the Web

My old high school was deeply involved in Round Square – an international organization of high schools that practiced education that strongly aligns with the following “pillars”:

  • Internationalism
  • Democracy
  • Environment
  • Adventure
  • Leadership
  • Service

My XML teacher mentioned this in the current week’s discussion, almost as a passing thought, but I thought this was a poignant list that is worthy of expounding upon here. These pillars are:

  • Valid code
  • Accessible code
  • Semantic code
  • Separation of content from presentation

Valid code (standards compliance)

Web code should validate according to the specifications set forth for what you’re using. Browsers today often let you get away with murder here by still allowing tag soup to occur – mostly due to documents being still served as text/html instead of application/xhtml+xml. Blame IE6 for now. But standards-mode does exist in all modern browsers, enabled by the power of the DOCTYPE declaration – a simple declaration of independence from browser-lock. Imagine an enterprise architecture, nay an entire Internet, where web applications are completely standards-compliant and the user could move freely between platforms, applications, browsers, and websites without fear or concern for compatibility.

Accessible code

Creating accessible code means thinking about the bare framework of your website infrastructure first, and adding on bells and whistles in a way that gracefully fail over in case of a problem on the client. You can’t predict what people will want to use when they show up to your website, so start with the lowest common denominator. Turn off all your CSS, Javascript, plugins, and images. Only deal with your app in terms of the HTTP requests coming in and out, and the HTML that presents itself. Would you build a house without pouring a foundation first? Heck no. Make a purely accessible web experience your foundation and then add your 15 pieces of flair, Mr. Fancypants. Make sure that your site is as usable to a Lynx, phone, or screenreader user as it is to your cutting-edge IE7 and Safari 3 folks.

Semantically correct code

What the hell is this box of beer bottles doing in my garage? Had I tagged it appropriately, I would clearly see that it is glass non-twist-off bottles suitable for home brewing. Not that I am able to drink most homebrew due to the barley malt causing me reactions due to celiac disease, but I digress…

XML encourages the web author to tag their content appropriately, explaining in-line what the meaning is for each item. Using XML technique in coding your XHTML documents means you are applying more meaning than the usual “here’s a paragraph” markup, information that could be used by future generations. Won’t somebody think of the children?!?

Separation of content and presentation

Spend some time at the CSS Zen Garden and you get the point. Content and presentation do not like to sleep in the same bed. They like to flirt with each other, play the field, sleep around. Tying them together with presentational markup and inline styles just means an unhappy, possessive relationship where neither party is able to grow.

So those are the pillars. Things I’m sure the Round Square would approve of. Keep these in mind and help your code realize its true potential as a member of society.

Leave a Reply

Your email address will not be published. Required fields are marked *