What are the three elements of meta tags in HTML5? Summary of the use of META tags

Source: Internet
Author: User
This article is mainly about the three elements of the HTML META tag, is the three attributes of the composition and use of the introduction, there are many more important attribute values, in the page is very useful, and now let us look at this article

First we need to know what the three elements of the META tag are?

1. Required attribute: Content property. This property is intended to define meta information related to the HTTP-EQUIV or Name property, where the content is used to search for information and classifications for bots.

2. Optional attribute: Name property This property is primarily used to describe a Web page. The value of the Name property can be: Author, description, keyword, generator, and so on

3. Optional attribute: Http-equiv property. This property is quite similar to the HTTP header file, and can return some useful information to the browser to help correct and accurately display the content. The value of the HTTP-EQUIV attribute can be content-type, expires, refresh, and so on;

This is the three elements of these three attributes that make up the HTML5 meta tag.

Let's take a look at these properties for specific usage descriptions:

But open any Web site with a list of meta tags in its head tag.

Meta is often used to define page descriptions, keywords, last modified dates, and other meta-data. These metadata will serve the browser (how to layout or reload pages), search engines and other Web services.

The META tag has two properties, the Http-equiv property and the Name property.

The Name property of the HTML5 meta tag:

The name attribute is primarily used to describe web pages, such as keywords, narratives, and so on. The corresponding property value for Content,content is the description of the name fill type, which is convenient for search engine crawling. The syntax format for the name attribute in the META tag is:

<meta name= "Parameters" content= "specific description" >.

One of the most important parameters of the Name property.

HTML5 the value of the META tag's Name property keywords (keyword):

Description: Used to tell the search engine the keywords of your webpage. Example:

<meta name= "keywords" content= "lxxyx, blog, arts student, Front end" >

HTML5 the value of the Name property of the META tag description (description of the site content):

Description: Used to tell the search engine the main content of your site. Example:

<meta name= "description" content= "topic.alibabacloud.com, programming learning website, online video tutorial" >

HTML5 the value of the META tag's Name property author (author):

Examples for labeling Web page authors:

<meta name= "Author" content= "topic.alibabacloud.com" >

HTML5 META Tag's Http-equiv property:

Http-equiv, as the name implies, corresponds to the file header of HTTP.

Equivalent to the role of HTTP, such as defining some HTTP parameters what.

The HTTP-EQUIV attribute syntax format in the META tag is:

<meta http-equiv= "Parameters" content= "specific description" >

Where the http-equiv attribute says one of the parameters:

Content-type (Set page character set) (recommended for use with HTML5)

Description: Used to set the page character set, easy browser parsing and rendering page example:

<meta http-equiv= "Content-type" content= "Text/html;charset=utf-8" >//Old HTML, not recommended

<meta charset= "Utf-8" >//html5 how to set the Web character set, we recommend using UTF-8

So much for the summary, there are too many custom attributes for the META tag. So I just went to find some of the commonly used ones, as well as the basic deprecated properties like window-target, and I didn't add them.

The HTML5 Meta tag works:

The META tag is a key tag in the head area of the HTML tag, providing basic information such as the character set of the document, the use of the language, the author and so on, as well as the setting of the keyword and the level of the page, the most important thing is to be able to do SEO.

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.