|
|||||||
Basic concepts |
|||||||
|
|||||||
Advanced concepts |
|||||||
|
Search engine indexing of pages
Specifying the language of a page
One of the most important factors in web page construction, but also one of the most frequently overlooked is that of how search engines will find them.
This should be done using the lang attribute on the HTML element. E.g., <HTML lang="en">. This will assist the user by ensuring that the document that they get is in their favored language.
Other codes include es (Spanish), fr (French) and de (German).
In addition, if the page has translations, you should link to these. This will allow search engines to find the page:
<HEAD>
<LINK rel="alternate" href="document.html" hreflang="es" lang="es" type="text/html">
</HEAD>
Meta data is information about data - it can be used to describe the page so that the search engine can index it appropriately:
<META name="keywords" content="Pekinese,Siamese,cats">
<META name="description" content="A page about cats">
Meta data always goes in the HEAD:
<HEAD>
<META name="keywords" content="Pekinese,Siamese,cats">
<META name="description" content="A page about cats">
</HEAD>
The keywords are a comma-separated list of keywords that should trigger a 'hit' on your site. The description is just that - the description that the site will use to describe your page.
In order that search engines can find the start page of a linked collection as well as the individual pages, you should use the LINK element:
<HEAD>
<LINK rel="start" type="text/html" href="main.html" title="A description of the link">
</HEAD>
The A element represents by far the most common sort of link - to change from one document to another. The LINK element on the other hand, allows more unusual relationships to be specified - we've already seen it be used to link style sheets (see the section on formatting), and there also other relationships that it can make.
The type of relationship is specified using the rel and rev attributes, and the location of the linked document with the href attribute. For example, <LINK rel="contents" href="contents.html">. Note that the LINK element differs from A in that LINK is not rendered and therefore it can only appear in the head.
Despite not being rendered, the LINK element performs several useful functions:
The two main attributes on LINK, rel and rev specify whether a relationship is forward or reverse respectively. E.g.:
d.html - <LINK rel="nada" href="e.html">
e.html - <LINK rev="nada" href="d.html">
Here's some examples of what can be done:
That's the end of this part of the HTML guide. The next section considers tables, so I suggest you click here to continue.
Copyright © RichInStyle.com 2000; all rights reserved. See copyright document for terms of use. Please visit Bukit Lawang flood appeal.