HTML and CSS Reference
In-Depth Information
In recent years, search engines have become more sophisticated in evaluating Web
sites. In the process, the meta element has decreased in importance. However, it is still
used by search engines when adding a site to their indices. Because adding metadata
requires very little effort, you should still include meta elements in your Web documents.
Working with Metadata
• To document the contents of a Web page, use the meta element
<meta name=” text ” content=” text ” />
where the name attribute specifies the type of metadata and the content attribute
stores the metadata value.
• To add metadata or a command to the communication stream between the Web
server and Web browsers, use
<meta http-equiv=” text ” content=” text ” />
where the http-equiv attribute specifies the type of data or command attached
to the communication stream and the content attribute specifies the data value or
Having discussed metadata issues with you, Gerry asks that you include a few meta
elements to describe his new site.
To add metadata to Gerry's document:
1. Return to the home.htm file in your text editor.
2. Directly below the meta element that defines the document's character set, insert
the following meta elements, as shown in Figure 2-48:
<meta name= author content= your name />
<meta name= description content= A site for sharing information on
digital photography and cameras />
<meta name= keywords content= photography, cameras, digital
imaging />
Figure 2-48
Adding meta elements to the CAMshots home page
metadata category
metadata value
3. Close the file, saving your changes.
4. Close any open files or applications.
Search WWH ::

Custom Search