HTML Advanced Tutorials (6)--html meta-information

Source: Internet
Author: User

Instance
Document description
the information in the Meta element can describe the HTML document.
<HTML><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=gb2312" /><Metaname= "Author"content= "w3school.com.cn"><Metaname= "Revised"content= "David yang,8/1/07"> <Metaname= "Generator"content= "Dreamweaver 8.0en"></Head><Body><P>The meta attribute of this document identifies the creator and the editing software.</P></Body></HTML>

View results:

Document Keywords
The
information in the Meta element can describe the document's keywords.
<HTML><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=gb2312" /><Metaname= "description"content= "HTML examples"><Metaname= "keywords"content= "HTML, DHTML, CSS, XML, XHTML, JavaScript, VBScript"></Head><Body><P>The meta attribute of this document describes the documentation and its keywords.</P></Body></HTML>

View results:

redirect
This example shows that the user is redirected to a different address if the URL has changed.
<HTML><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=gb2312" /><Metahttp-equiv= "Refresh"content= "5;url=". /index.htm "Tppabs= "http://www.w3school.com.cn/"></Head><Body><P>I'm sorry. We've moved. Your URL is<ahref=".. /index.htm "Tppabs= "http://www.w3school.com.cn/">http://www.w3school.com.cn</a></P><P>You will be redirected to the new address within 5 seconds.</P><P>If you still see this message after more than 5 seconds, please click on the link above.</P></Body></HTML>

View results:

Meta elements

As we explained in the previous chapter, the header element contains summary information about the document.

The HTML also contains a META element that is inside the head element. The role of the META element is to provide meta-information about the document.

In most cases, meta elements are used to provide information about a browser or search engine, such as describing the contents of a document, and so on.

Note: "Some user programs support using META to refresh the current page and replace it with another URL in a few seconds," the statement said. Developers should not use this technique to force users to go to different pages, as this will make the usability of the page worse. Instead, use server end multiplicity orientation for automatic page orientation.

See: Http://www.w3.org/TR/html4/struct/global.html#adef-http-equiv.

Keywords for search engines

Some World Wide Web search engines use the name and content properties of the META tag to index pages.

This Meta element defines the description of the page:

<name= "description"  content= "Free Web tutorials on HTML, CSS, XML, and XHTML "/>

This Meta element defines the keywords for the page:

<name= "keywords"  content= "HTML, DHTML, CSS, XML, XHTML, JavaScript, VBScript ">

The role of the name and content properties is to describe the content of the page.

However, because a lot of network managers use META tags to create spam, such as repeating keywords on the page to achieve the goal of improving rankings, some search engines have completely abandoned the use of them.

Please read our website building tutorials to learn more about search engines.

Unfamiliar meta-attributes

Sometimes you will find some meta attributes that are unfamiliar to you, such as:

<name= "Security"  content= "Low">

You just have to understand that these things have some special meaning for the site or developer, and maybe it doesn't matter to you.

You can also find more information about meta tags in our complete HTML4.01 label reference Manual.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.