HTML Coding Standard

From GLMWiki
Revision as of 16:08, 24 November 2008 by Ove (Talk | contribs)

Jump to: navigation, search

All web documents are to be written as HTML 4.01 Strict[1]. This ensures less confusion and stricter coding.

HTML Doctype

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">


Indenting and line breaks

  • One line for each HTML element.
  • One tab between every child/parent.

Example:

 <p>This is my list:
  <ul>
   <li>Item1</li>
   <li>Item2
    <ul>
     <li>Item2.1</li>
     <li>Item2.2</li>
    </ul>
   </li>
  </ul>
 It is a nice list</p>

Validation

The HTML code should validate, but this is most important during development to catch errors. The only real measurement of valid code is the browsers. If it works on all out target browsers ++ then a HTML validation warning is for the most part a bagatelle.