Office of University Relations

HTML markup standards

Any markup tools may be used to customize the templates or to create Web pages provided the following markup standards and guidelines are followed.

Ensure all Web pages use an appropriate document type definition (DTD)

Documents must use a W3C-approved DTD. If at all possible XHTML 1.0 transitional should be used.

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Markup should validate against the DTD used

Markup should be syntactically correct and should be validated against these DTDs. A suitable online validation tool is the W3C validator. After developing site templates, they should be validated before being made available to Web authors.

Avoid using deprecated markup

Avoid using deprecated markup elements such as <center>, <strike>, or <u>. A list of deprecated elements is provided by the W3C.

Avoid using deprecated attributes such as align="", bgcolor="". The W3C provides a list of deprecated attributes.

Structural markup must be used

See using HTML tags properly

Markup style

Developers creating templates or those using text-style HTML editors should follow these style guidelines. Users of authoring tools such as Dreamweaver and FrontPage should follow as many of the guidelines as possible.

Use lowercase

All markup and attributes should be written in lower case. This is required for documents to validate against the XHTML DTD. It should also be used for HTML DTDs to enable a smoother transition to XHTML in the future.

Wrong: <P>This is a paragraph with <STRONG>important text</STRONG>.</P>

Right: <p>This is a paragraph with <strong>important text</strong>.</p>

Enclose attributes in quotation marks

Attributes should be enclosed in quotation marks. This is required for documents to validate using XHTML DTDs and recommended practice for those using HTML DTDs.

Wrong: <table width=100%></table>

Right: <table width="100%"></table>

Use comments

Use HTML comments to show the page structure and mark important elements. This improves readability and can assist when correcting faulty markup.

<!-- H E A D E R -->

Encode special characters

Ensure that special characters are properly encoded. Take particular care when cutting and pasting from word-processed documents.

" = &quot;

& = &amp;

© = &copy;