Enter HTML5 entry to proficient:<meta> label

Source: Internet
Author: User
Keywords tags HTML5 Getting started to master

"Reprint please retain the integrity of the content of the Wind network article, if you do not comply with this principle, we will retain the right to pursue legal responsibility"

<meta> Label

Definitions and usage

<meta> elements provide meta information about the page (meta-information), such as descriptions and keywords for search engines and update frequencies.

The <meta> label is located on the head of the document and contains no content. The <meta> label properties define the name/value pairs associated with the document.

Differences between HTML 4.01 and HTML 5

The scheme attribute is no longer supported in HTML 5.

In HTML 5, there is a new CharSet property that makes the definition of a character set easier.

In HTML 4.01, you have to write this:

<meta http-equiv= "Content-type" content= "HTML; Charset=iso-8859-1 ">

In HTML 5, that's enough:

<meta charset= "Iso-8859-1" >

Tips and comments

Wind Network (www.ithov.com) Tip: Please use CSS to define the type of list.

Example

Define keywords for search engines:

<meta name= "keywords" content= "HTML, CSS, XML, XHTML, JavaScript"/>

Define a description of the page:

<meta name= "description" content= free web technology tutorials. "/>

To define the latest version of a page:

<meta name= "Revised" content= "David, 2008/8/8/"/>

Refresh page every 5 seconds:

<meta http-equiv= "Refresh" content= "5"/>

Property

The

property value describes the character encoding of the document defined by the 4 5 charset character encoding. 5 content Some_text defines the meta information associated with the HTTP-EQUIV or name attribute. 4 5 http-equiv Content-type expires Refresh


Set-cookie Associates The content attribute to the HTTP header. 4 5 Name author Description Keywords Generator revised to associate the content attribute to a name. 4 5 Scheme Some_text defines the format used to translate the value of the content property. Not supported. 4

Standard properties

Class, Contenteditable, ContextMenu, dir, draggable, id, irrelevant, lang, ref, Registrationmark, TabIndex, template, For a complete description of the title, visit the standard properties in HTML 5.

Event Properties

Onabort, onbeforeunload, onblur, onchange, onclick, OnContextMenu, ondblclick, Ondrag, Ondragend, OnDragEnter, OnDragLeave, OnDragOver, ondragstart, OnDrop, OnError, onfocus, onkeydown, onkeypress, onkeyup, onload, OnMessage, OnMouseDown, OnMouseMove, onmouseover, onmouseout, onmouseup, OnMouseWheel, OnResize, Onscroll, Onselect, onsubmit, OnUnload for a complete description, visit the event properties in HTML 5.

Tiy instance

Document description

<html>
<head>
<meta http-equiv= "Content-type" content= "HTML; charset=gb2312 "/>
<meta name= "Author" content= "w3school.com.cn" >
<meta name= "Revised" content= "David yang,8/1/07" >
<meta name= "generator" content= "Dreamweaver 8.0en" >
</head>
<body>
<p> the meta attribute of this document identifies the creator and the editing software. </p>
</body>
</html>

The information in the Meta element can describe the HTML document.

Document Keywords

<html>
<head>
<meta http-equiv= "Content-type" content= "HTML; charset=gb2312 "/>
<meta name= "description" content= "HTML Examples" >
<meta name= "keywords" content= "HTML, DHTML, CSS, XML, XHTML, JavaScript, VBScript" >
</head>
<body>
<p> the meta properties of this document describe the document and its keywords. </p>
</body>
</html>

The information in the Meta element can describe the keywords in the document.

redirect

<html>
<head>
<meta http-equiv= "Content-type" content= "HTML; charset=gb2312 "/>
<meta http-equiv= "Refresh" content= "5;url=http://www.w3school.com.cn" >
</head>
<body>
<p>
I am sorry. We've moved. Your URL is <a href= "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 5 seconds, please click on the link above. </p>
</body>
</html>

This example demonstrates that the user is redirected to another address when the URL has changed.

Related Article

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.