HTML and CSS Reference
In-Depth Information
the Web server and the browser. Note that the scheme attribute is not supported under
HTML5, while the charset attribute (not listed above) is supported only under HTML5.
There are three uses of the meta element:
• To store information about a document that can be read by the author, other users, and
Web browsers
• To control how browsers handle a document, including forcing browsers to automati-
cally refresh the page at timed intervals
• To assist Web search engines in adding a document to their search index
For example, the following meta element stores the name of the Web page's author:
<meta name=”author” content=”Gerry Hayward” />
For search engines, you should include metadata describing the site and the topics
it covers. This is done by adding a meta element containing the site description and
another meta element with a list of keywords. The following two elements would sum-
marize the CAMshots Web site for search engines:
Avoid generic and vague
descriptions of your Web
site. Instead, to attract a
specific target audience to
your site, use descriptions
and keywords that show
how your Web site is dif-
ferent from others.
<meta name=”description” content=”CAMshots provides advice on
digital cameras and photography” />
<meta name=”keywords” content=”photography, cameras, digital
imaging” />
Figure 2-47 lists some other examples of metadata that you can use to describe your
documents.
Figure 2-47
Examples of the uses of the meta element
Meta Name
Example
Description
author
<meta name=”author”
content=”Gerry Hayward” />
Supplies the name of the docu-
ment author
classification
<meta name=”classifi cation”
content=”photography” />
Classifies the document category
copyright
Provides a copyright statement
<meta name=”copyright”
content=”&copy; 2014 CAMshots” />
description
<meta name=”description”
content=”Digital photography
and advice” />
Provides a description of the
document
generator
<meta name=”generator”
content=”Dreamweaver” />
Indicates the name of the pro-
gram that created the HTML code
for the document
keywords
Provides a list of keywords
describing the document
<meta name=”keywords”
content=”photography, cameras,
digital imaging” />
owner
<meta name=”owner”
content=”CAMshots” />
Indicates the owner of the
document
rating
<meta name=”rating”
content=”general” />
Provides a rating of the docu-
ment in terms of its suitability
for minors
reply-to
<meta name=”reply-to”
content=” ghayward@camshots.com
(G. Hayward)” />
Supplies a contact e-mail address
and name for the document
 
Search WWH ::




Custom Search