Text size Small text Large text

The Unicursal Path

Notes on doctype, metatags and scripts

A look at the doctype, metatags and scripts used on this site, with links to more information about various techniques used.

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="all" />

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 favicon is found.

Javascript to help poor browsers

Linking to external scripts seems like the neatest way to call javascript.


<script type="text/javascript" src="scripts/minmax.js"></script>

This script makes IE recognise the ‘min–width’ and ‘max–width’ attributes.


<script type="text/javascript" src="scripts/sf-hover-focus.js"></script>

This script gets IE to mimic the behaviour of the ‘:hover’ pseudo–class on the <li> tags used in the fly–out/drop–down menu. For more details see htmldog.com.

Styling for print

<link href="styles/unicursal-print.css" rel="stylesheet" type="text/css" media="print" />

To deliver a different style for print.

Home | Portfolio | Contact me