What is a meta tag? meta tag summary

大家讲道理
Release: 2017-04-11 10:27:52
Original
2460 people have browsed it
meta tag definition
element can provide meta-information about the page (meta-in formation), such as for search IndexQinghe Updatefrequency descriptions and keywords.
The above is the explanation on w3c. Meta information is data used to describe data, that is, some information used to describe the current page. For example: define page description, keywords, author, etc.

Containedattributes
1.name attributename The attribute provides the name in the name/value pair (and the content attribute to be mentioned later is the value corresponding to the name). If we imagine a page as a physical object in our lives, take a resume as an analogy. Name, gender, place of origin, skills, project experience, etc. can all be regarded as the name attribute of a resume, and the content attribute is equivalent to The values corresponding to these names.
    Copy after login

2.content attributeThe content attribute provides the value in the name/value pair. The value can be any valid
string .The content attribute should always be used together with the name attribute or http-equiv attribute.

3.http-equiv attributeequiv is the abbreviation of equivalent, which means equal and equivalent. It is not difficult to understand that it is equivalent to the file header function of http. It can return some useful information to the browser to help display the web page content correctly and accurately. The corresponding attribute value is content. The content in content is actually each The
variable value of the parameter. (Students who don’t understand http can find relevant information to learn more).
    Copy after login

Commonly used name/value pairs
1.keywords (Keywords)Description: Used to tell the
search engine the keywords of your web page. Example:
    Copy after login
##2.description (description of website content) Description: Used to tell search engines that your website main content. Example:
Copy after login

3.author(author) Description: Used to mark the author of the web page Example:
Copy after login

4.r enderer (dual-core browser rendering method)Description: renderer It is prepared for dual-core browsers and is used to specify how the dual-core browser renders the page by default. For example, 360 browser. Example:
 //默认webkit内核  //默认IE兼容模式  //默认IE标准模式
Copy after login

5. viewport(Mobile window)Description: viewport Considered as an attribute of mobile terminal design
Copy after login

    width
  1. Height

    ─The height of the viewport

  2. Initial-SCALE-The initial zoom ratio

  3. minimum-scale The minimum scale
  4. maximum-scale – The maximum scale the user is allowed to zoom to
  5. user-scalable – Whether the user can manually zoom
6.content-Type(设定网页字符集)
说明:用于设定网页字符集,便于浏览器解析与渲染页面举例:
  •  //旧的HTML,不推荐  //HTML5设定网页字符集的方式,推荐使用UTF-8
    Copy after login

7.X-UA-Compatible(浏览器采取何种版本渲染当前页面)
说明:用于告知浏览器以何种版本来渲染页面。(一般都设置为最新模式,在各大 框架中这个设置也很常见。)举例:
  •  //指定IE和Chrome使用最新版本渲染当前页面
    Copy after login

8.refresh(自动刷新并指向某页面)
说明:网页将在设定的时间内,自动刷新并调向设定的网址。举例:
  •  //5秒后重定向到w3c官网
    Copy after login

额额额,一个一个的太累了,下面是一大坨meta标签:
  •                                                                                           
    Copy after login


The above is the detailed content of What is a meta tag? meta tag summary. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!