This page provides a list of page headers useful in creating new pages from scratch.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
If you plan to use XHTML 1.0 or 1.1, use this opening tag:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Or, if you plan to use XHTML 2.0, use this opening tag:
<html xmlns="http://www.w3.org/2002/06/xhtml2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2002/06/xhtml2 TBD"
xml:lang="en">
Usually a charset of UTF-8 is suitable, but I prefer to use ISO-8859-1 because it allows for non-English characters, such as é, without causing errors in HTML validators.
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/>
There are many other charsets, but I've never found the need to use any but the above two.
The following is useful for just copying and pasting into a new text editor document:
<!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>
I almost always use styles.css, placed in the root web directory, for my stylesheet name. If you use something else, replace it as appropriate. Sometimes I use several stylesheets on a single page, just for organizational purposes. If you choose to do that, you can just keep adding them one after the other in their own "link" tag. Remember that each new stylesheet replaces the one before it, so if you use the same tags you might wipe some out--this can be a good thing, if that is what you want to do, or incredibly frustrating if you do so in error!
This site and its original contents are copyright © 1994-2008 by Erika Stokes.
All original designs belong to the respective copyright owners. All Rights Reserved.