HTML and XHTML Document Frameworks

Here are some useful frameworks for building new pages:

HTML 4.01 Transitional Framework

These headers are fine for most pages—sometimes XHTML is overkill… but do consider HTML5, as well!

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>INSERT TITLE HERE</title>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<meta name="keywords" content="INSERT KEYWORDS HERE">
<meta name="description" content="INSERT DESCRIPTION HERE">
<link href="/styles.css" rel="stylesheet" type="text/css">
</head>
<body>
</body>
</html>

XHTML 1.0 Strict Framework

If you’ve chosen not to use HTML5, but your document has to behave under all circumstances, use this framework and be sure to close all your tags.

<!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" lang="en" xml:lang="en">
<head>
<title>INSERT TITLE HERE</title>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
<meta name="keywords" content="INSERT KEYWORDS HERE" />
<meta name="description" content="INSERT DESCRIPTION HERE" />
<link href="/styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
</body>
</html>

HTML5 Framework

 
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>INSERT TITLE HERE</title>
</head>
<body>
</body>
</html>