The Doctype
OK, back to the beginning.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
All HTML documents include a doctype tag, which tells the browser which language specification to use, such as XHTML or the older HTML standards. As I use XHTML, the specifications available are:
- XHTML Strict - includes all elements and attributes supported by valid XHTML standards. This does not include those elements and attributes that are out of date and no longer in use (deprecated). All XHTML documents should aim to be running from this specification to be fully standards compliant.
- XHTML Transitional - includes all elements and attributes supported by valid XHTML standards, as well as those elements and attributes that are deprecated. As the name suggests, this is often used when migrating documents from older versions to XHTML Strict.
- Frameset - includes all elements and attributes found in the Transitional doctype, as well as support for frames, which are not part of the XHTML Strict specification.
From my own experience, there has been no reason to use anything other than strict specification when starting a new site build.