HTML Coding Standard

From GLMWiki
Revision as of 10:52, 8 March 2013 by Ove (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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>


Indenting and line breaks

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

Example:

 <p>This is my list:</p>
 <ul>
  <li>Item1</li>
  <li>Item2
   <ul>
    <li>Item2.1</li>
    <li>Item2.2</li>
   </ul>
  </li>
 </ul>
 <p>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.