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...)

You will get this error:

Error Line 8 column 46: end tag for "meta" omitted, 
  but OMITTAG NO was specified.
  <meta name="Author" content="FYIcenter.com">
You may have neglected to close an element, 
or perhaps you meant to "self-close" an element, 
that is, ending it with "/>" instead of ">". 

Note to HTML 4.0 authors, you must close meta elements in XHTML 1.0. This is the opposite of HTML 4.0, where you must not close meta elements.

What Is a META Tag/Element?

A meta element is optional child element of the head element. A meta element provides one piece of extra information about the XHTML document. Here are some important rules about meta elements:

  • Meta elements are optional.
  • Meta elements can only be used as sub-elements of the head element.
  • Meta elements must be closed.
  • Meta elements have a required attribute called "content".
  • Information provided in meta elements will not be display by any browser.
  • Most search engines will use some special meta elements.

What Is the Description META Tag/Element?

The description meta element is a special meta element that provides a short descript about the XHTML document. The description meta element must include the "name" attribute as, name="description". Here is an example:

<meta name="description" content="A collection of XHTML
tutorials on head, body and meta elements by FYIcenter" />

XHMTL browsers are usually ignoring the description meta element. But most search engines are using the information provided in the description meta element to show your page in the search result listing. So it is very important to code the description meta element properly in your XHTML documents following rules below:

  • Do include the description meta element for every XHTML page.
  • Do not write very long descriptions. They should be around 150 characters long.
  • Do not include any special characters like & @, #, %, ...

What Is the Keywords META Tag/Element?

The keywords meta element is a special meta element that provides a list of keywords about the XHTML document. The keywords meta element must include the "name" attribute as, name="keywords". Here is an example:

<meta name="keywords" content="XHTML, tutorials, tags,
elements, Web, tips" />

XHMTL browsers are usually ignoring the keywords meta element. But some search engines are using the keywords provided in the keywords meta element to index and rank your XHTML documents. So it is important to code the keywords meta element properly in your XHTML documents following rules below:

  • Do include the keywords meta element for every XHTML page.
  • Key words should be comma delimited.
  • Do not write too many words. They should be around 150 characters long.
  • Do not include any special characters like & @, #, %, ...

(Continued on next part...)

Part:   1  2  3  4   5  6 


Selected Developer Jobs:

More...