XHTML Design Guide
Introduction

Introduction

0. Introduction to HTML

0.1 Return to the Source
0.2 Historical Perspective on Hypertext
0.3 Modularity
0.4 General Tag Formats


0.1 Return to the Source

The standards and guidelines that evolved to create what is today known as the World Wide Web took many paths. This document is an attempt at a brief history of the birth and genesis of the language used in the "world's only functioning anarchy" in order to put the current evolution of it's languages and standards in perspective.

Interestingly enough the current standard for HTML incorporates many long-forgotten rules of "strict" HTML structure. This "strict" flavor of HTML is directly related to it's parent language SGML. As HTML moves into the 21st century, it is important to review the ancient standard that gave HTML life: SGML.

0.2 Historical Perspective on Hypertext

Standard Generalized Markup Language (SGML) evolved out of CERN's (European Organization for Nuclear Research) need for a cross-platform, cross-browser language that would allow the network of CERN scientist to collaborate on projects. Tim Berners-Lee, a scientist working at CERN, drafted a proposal in 1989 for a hypertext document linking system based on the existing standard ISO 8879, (SGML). This proposal was later given the name "The World Wide Web".

SGML could be called the grandfather of today's web languages. It's strict coding guidelines were later discarded for the more user-friendly HTML. While SGML was strict and precise, HTML was developed informally. HTML was, at first, a language without any set guidelines and standards. As the web grew the need for a set of guidlines which all HTML authors could adhere to became more and more apparent.

The World Wide Web Consortium (www.w3.org) formed in 1994 jointly by CERN and MIT. The first standard to be used throughout the web was HTML 2. HTML 2 was designed to be flexible and allow for the different coding styles that had evolved. The idea was to make the language "backwards compatible" so that HTML documents already in existance could still be understood by HTML 2 friendly browsers.

You might be thinking: "Yeah, that's nice but what does it have to do with writing good code?" . Don't worry, you do not need to know any of this history to write good HTML!! However it is useful to understand the process through which the HTML standard evolved. As the web continues to evolve it's standards change. Learning about HTML's history from will make it easier for any given web programmer to transition into the newer, stricter flavors of HTML.

Some words about HTML

HTML Coding is an integral part of the software development process for all Internet-based projects. HTML is an evolving coding language. At present there are many versions of the language and many structures within the language that have not been formally adopted as standard additions to the language. As such, it is critical that some formal standards be used for development at The Onaicul Project.

The purpose of establishing HTML coding guidelines is to provide a generally agreed upon structure which should be adhered for HTML coding during the development and production processes. The guidelines ensure that all HTML written at The Onaicul Project will be compatible with current HTML standards (and browsers). In addition, the guidelines also provide a standardized structure that frees engineers from having to make trivial coding syntax decisions, and increases the maintainability, readability, usability, and reusability of code.

HTML Structure: Modularity

The idea behind using modules for organizing large information structures comes from a desire to simplify what would be an otherwise chaotic structure. Modules can also be though of as "snippets" of HTML code that when pre-fabricated can easily allow a Web Developer to create a web page from scratch. They should function as the building blocks of any Web Project.

As with any coding or programming language, modularity is important for both maintainability and reusability. HTML supports two modular coding constructs: HTML/Server Site Include Files and Style Sheets. In addition to these physical constructs, modularity of site/application design should also be taken into account. HTML coders should play an active role in identifying reusable and redundant site components during the design phase of projects. Once identified, these components should be built using a template model for reuse throughout the current and future projects.

Server Side Includes are excellent ways to include a footer that has the date last modified, the author's email and other miscellaneous copyright text. Once created this "mini html" document can be included on every single page that makes up a site. Also if for some strange reason the authors email changes you can easily update that one single SSI file and thereby update the entire site.

Cascading Style Sheets are a simple yet powerful method of allowing attachment of rendering information to HTML documents. Rather than relying on the <font> tag or any other browser specific tag CSS instead allows the author to instantly update the layout and formatting of a large number of interdependent documents.

Browser support for Cascading Style Sheets (CSS) is limited to 4.0 browsers and above (Netscape and IE) older browsers barely understand them. If you want to use Style Sheets, make ure that your audience has the right type of browser.


General Tag Specific Format Conventions

Frames Frames were introduced early in HTML and are supported by most browsers that The Onaicul Project designs for. Frames are good for site designs that have static modular elements (eg: separate content and navigation frames). Unfortunately frames are intrepreted differently by different browsers and they can introduce complicated navigational target problems. Because of these problems frames should be used with caution and should be thouroughly tested in all browsers before deployment. As an alternative tables can be used for most things that are accomplished by frames.
Style Sheets Cascading Style Sheets (CSS) is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents. Not all of the browsers implement the full specification, but releases are coming out fast so this should soon change. Generally Style Sheets are safe to use on 4.0 and above browsers. That said, Style Sheets should be used whenever possible.
Layers Layers are even newer than Style Sheets in HTML. As such, they should be used very cautiously, if at all. This decision will likely change as layers become more widely supported. Tables can be used for many of the things that layers attempt.
Tables Tables should be used for most site layout functions, but they should be used with discretion. Over-complication with tables is a common problem, and presents difficulty for debugging and maintenance. As always, the design should be thoroughly thought out before the code is written. Several options for table layout may be available with minimal design impact. In all cases, the simpler the layout design, the better.

Still have questions?
Check the Informative HTML Tutorials linked below:

HTML Made Really Easy

Dmoz: HTML Tutorials

HTML 101: Back to Basics

§ Further Reading §




The Onaicul Project
Valid XHTML 1.0! Under OpenContent License Made with CSS
contact: <luciano$onaicul,com>