Here's a handy list of the most common meta tags, doctypes, and links, Many of the <link> are not really usefull, though the stylesheet is obviously commonly used, the "Alternate" is also special, the lang (language) attribute will indicate a translated version, the media attribute indicates a version intenede for another media, for example printing. Just remember that user agent support for these attributes are not complete. Currently only iCab for the mac supports these links in a meaningfull way.
As a good coder, it's important to specify a DOCTYPE, this will let the browser know what kinda of document it's dealing with. Because, of course, a webpage isn't just a webpage, there's many kinds, and you let the browser know ith your DOCTYPE. This tag has to be inserted in before any other tag, so if you go to validator.w3c.org, and it tells you that your page has an error before the first <html> tag, it's because your doctype is missing.
Now what kinda should you use? Well, if you just make webpages, and you're not really sure what to use, use this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
transitional//EN" "http://www.w3.org/tr/html4/loose.dtd">
Now what does this thing do? Well, it tells that it's a HTML document, that it uses the "transitional" kind of the HTML 4.0 specification. It also denotes a english document with the little traling "//EN". Now the final part, the url that leads to a socalled dtd file, is the really fun part. For starters, I suggest you copy that part of the page, and paste it into the browser adress bar, and you'll se the real fun part. Now if you scroll down, you'll probably see some things you recognize, like various tags and so on. Also what this tells the browser, is how to thandle each and single tag, what values are required, what tags do what and so. What this ultimately allows you is to write you own DTD, which stands for Document Type Definition by the way.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-Strict.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/tr/html4/loose.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Draft//EN">
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<base href="http://svend.neoideo.dk/meta/index.html">
<link rel="shortcut icon"
href="http://svend.neoideo.dk/favicon.ico">
<link rel="Stylesheet" href="style.css" type="text/css">
<link rel="Alternate" href="http://some.org/eng_index.html"
lang="en-gb" media="print">
<link rel="Contents" href="content.html">
<link rel="Index" href="index.html">
<link rel="Glossary" href="gloss.html">
<link rel="Copyright" href="copyright.html">
<link rel="Chapter" href="chapter5.html">
<link rel="Section" href="chapter5#more.html">
<link rel="Subsection" href="chapter5_sub.html">
<link rel="Appendix" href="app.html">
<link rel="Help" href="help.html">
<link rel="Bookmark" href="http://some.org/index.html">
<link rel="prev" href="chapter4.html">
<link rel="next" href="chapter6.html">
<link rev="help" href="http://some.org/index.html">
<link rev="made" href="mailto:set@neoideo.com">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Language" content="en-GB">
<meta http-equiv="Refresh" content="3;url=http://www.some.org/some.html">
<meta http-equiv="Window-target" content="_top">
<meta http-equiv="expires" content="-1">
<meta http-equiv="expires" content="Thu, 1 October 1998 00:00:00 PST">
<meta http-equiv= "pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-store">
<meta name="robots" content="noindex,follow">
<meta name="robots" content="all">
<meta name="description" content="A straight line description">
<meta name="keywords" content="comma, seperated, list">
With this page I aim to provide a complete listing over these semi undocumented tags, doesn't mean they work, as they usually don't, but they are here provided as alternatives, if one should not work. Thus there's four different ways of telling the browser not to cache the page.
As for the DTD's, it's usually sufficient to declare the document to be of and PUBLIC type, the other is SYSTEM, which makes it madatory to provide a DTD at the specified URL. The doctype is for the most part NOT case insensitive, as allmost all other HTML is. It's usually a good idea to put it in uppercase.
Another word about validating your pages, it's worth nothing that the way you declare you DTD, will affect how your document is validated. in this way:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN"
"http://www.w3.org/TR/html4/strict.dtd">
your document's html tags MUST start with also uppercase, since you used uppercase, if not, the parser wont be able to find the HTML element, since you used a "html" element. Another case of hmtl not being case insensitive.