Community wiki

Community wiki

Valid HTML

This page explains how to write valid HTML for eGroupWare.
  • We are currently aiming for conformance with XHTML 1.0 Transitional, so pages should use the following document type declaration:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
For documents containing frames, this is the right one:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "">
  • All tag names, attribute names, and special attribute values like "center", "middle", or "post" must be in lower case. This also applies to their appearance in CSS files.
  • Empty elements must have a slash at the end of their tag, like this: <br />. (A space before the slash is useful for compatibility with older browsers, but perhaps it's no longer necessary.) Elements typically affected by this rule are br, hr, img, input, meta.
  • Attribute values must be quoted (cellspacing="0" or cellspacing='0').
  • All attributes must have a value like <option selected="selected">. The short form is no longer allowed.
  • img elements must have an alt attribute.
Above all, however, the nesting of the elements needs to be correct.

The following are more advanced conformance features that we might not want to worry about right now:
  • There should be an HTML namespace declaration in the html start tag.
  • There should be an XML declaration like <?xml version='1.0'?>.
  • The use of the attributes lang and xml:lang needs to cleaned up.
  • The use of encodings and their declaration needs to be checked.

Back to DeveloperDocs
You are here