Links and Style - Page 3
July 15, 2002
Links aren't metatags but they do go in the Head section. They
usually include the REL attribute, which indicates that the
file about to be specified is related to the current file.
There's an alternative attribute, REV, which shows a reverse
relationship, but it's rarely used.
External Stylesheet Link
<LINK href="Other_files/gs.css" rel=STYLESHEET type=text/css>
This instructs the browser to apply the stylesheet found at the
specified address. It's a popular kind of link found on many
sites. Note there are three elements to this tag, at least in
its popular form. Many more attributes can be added, for
example specifying language and encryption, but they're rarely
used.
For more details on stylesheet linking try:
http://www.htmlhelp.com/reference/html40/head/link.html
Favicon
<LINK REL="SHORTCUT ICON" href="http://mysite.com/favicon.ico">
Favicons are those cute little icons you get to see in Internet
Explorer in the address bar and Favorites list. The tiny .ico
graphic usually resides in the root directory, but if it lives
elsewhere, this is where you get to specify the filepath. The
link usually isn't necessary if your graphic is in the default
root directory, but it's useful if it's somewhere else, or if a
few pages use an alternative .ico graphic, or if you have
problems getting the favicon system to work properly.
Style
<style type="text/css">
<!--
.white { font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10pt;
font-weight:
bold; color: #FFFFFF}
td { font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10pt}
-->
</style>
The <style> tag is used within the <Head> section
for embedded stylesheets. Note that the details of the
stylesheet are within comment tags, otherwise they might show
in old browsers.
What Does HTTP-EQUIV Mean?
HTTP is the protocol used by the server and browser for
information passed between them. Of course the full definition
is more complicated than that, but this brief one is sufficient
to understand http-equiv.
Usually, you don't get to see the fields of the HTTP
communication between the server and browser. But here's an
example of what's typically sent.
HTTP/1.0 200 OK
Server: My-server/1.1
Date: Tuesday, 4-Jun-02 01:22:04 GMT
Last-modified: Sunday, 2-Jun-02 10:44:53 GMT
Content-length: 6372
Content-type: text/html
This is followed by the regular HTML file.
When a Meta tag says http-equiv, it's informing the world that
the information it's presenting is the equivalent of an HTTP
field, and can be used as such by any system that requires HTTP
information. It's something that's frequently done because it's
far easier to write an http-equiv than it is to create a field
directly in HTTP.
It's worth noting that HTTP information is sometimes ignored by
proxy caches. They are in the business of keeping traffic
levels down, and if an inconvenient HTTP field doesn't fit with
this aim, it may be ignored. The classic example is the
NO-CACHE field.
Dull stuff
Generator
<META content="MSHTML 6.666" name=GENERATOR>
This is the place where your HTML editing software or browser
(if you save a Web page to disk) gets the chance to blow its
trumpet and scrawl its name. Most developers make sure this
particular bit of nonsense doesn't reach the server, but it can
be useful from time to time. If, for example, you develop a
page as a one-off, knowing that somebody else will be working
on it in the future, it may be helpful to leave the generator
line intact so the next developer knows what software you used.
Document
<meta name="resource-type" content="document">
This was a common tag many years ago, and simply specifies that
the file is a document. Most sites don't bother with it now,
because it's assumed by default
Distribution
<meta name="distribution" content="global">
Here's another straightforward tag that has fallen out of
favor, as it's assumed by default. In theory you can use this
tag to limit the distribution of a file, but it's rare to do
so.
Robots
<META NAME="ROBOTS" CONTENT="NOINDEX,FOLLOW">
This is inferior to using a robots.txt file, so won't be
covered in detail, but if you really need to, you can give
basic indexing instructions to robots here, and a few may
actually follow them!
Classification
<META content="wine, corks, corkscrews, france, napoleons"
name=Classification>
A few sites repeat the content of the keyword metatag in a
separate Classification tag. The theory is that it helps Search
Engines to classify the site. But this is one of those nice
ideas that nobody ever followed through.
And this is the end of this article about metatags and other
<Head>aches. There is a chance that one day XML will
persuade us to use closing </META> tags after
<META> tags, but for now we don't have to - so we can be
open-ended about that.
Interesting stuff - Page 2
Metatags and Other <Head>aches
|