|
Home >> FAQs/Tutorials >> XHTML Tutorials and Tips >> Index
XHTML 1.0 Tutorials - Document Structure and Head Level Tags
By: FYICenter.com
Part:
1
2
3
4
5
6
(Continued from previous part...)
What Is the Robots META Tag/Element?
The robots meta element is a special meta element that provides
directives to robots who is visiting the XHTML document.
The robots meta element must include the "name" attribute as, name="robots".
The "content" attribute must use predefined values of:
- content="index,follow" - Asking the robot to index the document, and follow links in the document.
- content="noindex,nofollow" - Asking the robot to not index the document, and not follow links in the document.
- content="index,nofollow" - Asking the robot to index the document, and not follow links in the document.
- content="noindex,follow" - Asking the robot to not index the document, and follow links in the document.
- content="all" - Same as content="index,follow".
- content="none" - Same as content="noindex,nofollow".
Here is a good example of the robots meta element:
<meta name="robots" content="index,follow" />
What Is a http-equiv META Tag/Element?
a http-equiv meta element is a special meta element that provides
information equivalent to HTTP headers. A http-equiv meta element must
include the "http-equiv" attribute as, http-equiv="Content-Type".
Here is some good examples:
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" />
<meta http-equiv="Refresh" content="3;
URL=http://dev.fyicenter.com/" />
<meta http-equiv="Expires" content="Sun, 22 Mar 1998
16:18:35 GMT" />
XHTML browsers and search engines are all respecting http-equiv
meta elements. So it is important to code the keywords meta element properly
in your XHTML documents following rules below:
- Include http-equiv meta elements in XHTML documents as needed.
Do not include all http-equiv meta elements in every XHTML documents.
- Attribute "http-equiv" must contain valid HTTP headers defined in HTTP protocol.
- Attribute "content" must contain valid values that matches the HTTP header
specified in "http-equiv".
- http-equiv="Content-Type" is used to specify the document type, and character set.
- http-equiv="Refresh" is used to specify a refresh with a waiting period and a URL.
- http-equiv="Expires" is used to an expiration time of the document.
What Is the Author META Tag/Element?
The author meta element is a special meta element that provides
information about the author of the XHTML document.
The author meta element must include the "name" attribute as, name="author".
Here is an example:
<meta name="author" content="FYIcenter.com" />
XHMTL browsers are usually ignoring the author meta element.
But some search engines are using the information provided in the
author meta element.
What Is the Base Tag/Element?
The "base" element is an optional sub-element of the "head" element.
The "base" element specifies a base URL for all the hyper links in XHTML
document. It has one required attribute called "href" to allow you to
specify the base URL.
Here is an example:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<base href="http://dev.fyicenter.com/faq/" />
<title>My First XHTML Document</title>
</head>
<body>
<p><img src="images/fyi.gif" alt="FYI" /></p>
</body>
</html>
If you view this document in a browser, the image will be fetched from
http://dev.fyicenter.com/faq/images/fyi.gif.
(Continued on next part...)
Part:
1
2
3
4
5
6
|