Slide 2.28: HTML head
Slide 2.30: HTML character entities
Home

HTML Meta


HTML also includes a meta element that goes inside the head element. Its purpose is to provide meta-information about the document. Most often the meta element is used to provide information that is relevant to browsers or search engines like describing the content of your document.

Keywords for Search Engines
Some search engines on the Web will use the name and content attributes of the meta tag to index your pages. The following meta elements define a description and keywords of your page, respectively:

  <meta name="description" content="Free Web tutorials
       on HTML, CSS, XML, and XHTML">
  <meta name="keywords" content="HTML, DHTML, CSS, XML,
       XHTML, JavaScript, VBScript">

However, since too many webmasters have used meta tags for spamming, like repeating keywords to give pages a higher ranking, some search engines have stopped using them entirely. The following meta element tells search engines do not index this page or follow the hyperlinks in this page.

  <meta name="robots" content="noindex,nofollow">

Redirecting a User
The example redirects a user if the address has changed:
  <meta http-equiv="Refresh"
    content="5;url=http://www.und.edu/">

Unknown Meta Attributes
Some meta attributes may be unknown to you like this:
  <meta name="rank" content="low">

Then you just have to accept that this is something unique to the site or to the author of the site, and that it has probably no relevance to you.

Demonstration
The following demonstration shows how the HTML script is displayed on the Web.