Difference between revisions of "HTML Coding Standard"
From GLMWiki
(New page: All web documents are to be written as HTML 4.01 Strict[http://www.w3.org/TR/html401/]. This ensures less confusion and stricter coding. == HTML Doctype == <nowiki><!DOCTYPE HTML PUBLIC "...) |
|||
Line 25: | Line 25: | ||
It is a nice list</p> | It is a nice list</p> | ||
</pre> | </pre> | ||
+ | |||
+ | == 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. | ||
+ | |||
[[Category:Front End Development]] | [[Category:Front End Development]] |
Revision as of 16:08, 24 November 2008
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.