Notes on doctype and metatags
A look at the doctype and metatags used on this site.
The doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
XHTML served as HTML.
A few basic metatags
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
It is important to define the character set for the document. For XHTML served as HTML the W3C recommend UTF–8.
<meta name="robots" content="index,follow" />
Allowing indexing for all pages on the site.
<meta name="mssmarttagspreventparsing" content="true" />
Stopping Microsoft from inserting their own links! (Whatever happened to ‘smart’ tags?)
<meta http-equiv="Window-target" content="_top" />
To break out of the frames of other sites.
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="icon" href="favicon.ico" type="image/ico" />
Making sure the
favicon is found.
Styling for print
<link href="styles/unicursal-print.css" rel="stylesheet" type="text/css" media="print" />
To deliver a different style for printing.
