Home Web Front-end HTML Tutorial Summary of some commonly used metas

Summary of some commonly used metas

Mar 19, 2017 pm 05:28 PM

Element

Summary

Tags provide metadata about HTML documents. The metadata is not displayed on the page, but is machine-readable. It can be used by browsers (how content is displayed or pages are reloaded), search engines (keywords), or other web services.

Required attributes

Attributes Value describe
content some text Define meta-information related to http-equiv or name attributes

Optional attributes

Attributes Value describe
http-equiv content-type / expire / refresh / set-cookie Associate the content attribute to the HTTP header.
name author / description / keywords / generator / revised / others Associate the content attribute to a name.
content some text Defines the format used to translate content attribute values.

SEO optimization

Referring to the document

  • Page Keywords, each web page should have a unique set of keywords that describe the content of the web page.
    Use descriptive and representative keywords and phrases that people are likely to search for, and accurately describe the information provided on the web page. Mark content that is too short and search engines may not consider it relevant. Also tags should not exceed 874 characters.

1

<meta>

Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
  • Page Description Each web page should have a description tag that is no longer than 150 characters and accurately reflects the content of the web page.

1

<meta>

Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
  • Search engine indexing method, robotterms is a set of values ​​separated by commas (,), and usually has the following values : none, noindex, nofollow, all, index and follow. Make sure to use the nofollow and noindex attribute values ​​correctly.

1

2

3

4

5

6

7

8

9

<meta>

<!--

    all:文件将被检索,且页面上的链接可以被查询;

    none:文件将不被检索,且页面上的链接不可以被查询;

    index:文件将被检索;

    follow:页面上的链接可以被查询;

    noindex:文件将不被检索,但页面上的链接可以被查询;

    nofollow:文件将不被检索,页面上的链接可以被查询。

 -->

Copy after login
  • Page redirection and refresh: The number in the content represents the time (seconds), that is, how long it takes to refresh. If you add a URL, it will redirect to the specified web page (search engines can automatically detect it, and it can easily be regarded as misleading by the engine and punished).

1

<meta>

Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
  • Other

1

2

3

4

<meta> <!-- 定义网页作者 -->

<meta>

<meta>

<meta>

Copy after login

Mobile device

  • viewport: Can optimize the display of mobile browsers. If the website is not responsive, do not use initial-scale or disable scaling.
    The viewport width of most 4.7-5-inch devices is set to 360px; the 5.5-inch device is set to 400px; the iphone6 ​​is set to 375px; the iphone6 ​​plus is set to 414px.

1

2

<meta>

<!-- `width=device-width` 会导致 iPhone 5 添加到主屏后以 WebApp 全屏模式打开页面时出现黑边  -->

Copy after login
  1. width: width (number / device-width) (range from 200 to 10,000, default is 980 pixels)


  2. ## height: height (numeric value / device-height) (range from 223 to 10,000)


  3. initial-scale: Initial scaling (ranging from >0 to 10)


  4. ## minimum-scale: The minimum scale the user is allowed to zoom to

  5. maximum-scale: The maximum scale the user is allowed to zoom to

  6. user-scalable: Whether the user can manually shrink (no,yes)

  7. minimal-ui: You can minimize the upper and lower status bars when the page loads. (Deprecated)
  8. Note that many people use initial-scale=1 on non-responsive websites, which causes the website to render at 100% width, requiring the user to manually move the page or zoom. If user-scalable=no or maximum-scale=1 is used together with initial-scale=1, the user will not be able to zoom in/out the web page to see the entire content.

  • WebApp full screen mode

    : Disguise app, offline application.

    1

    <meta> <!-- 启用 WebApp 全屏模式 -->

    Copy after login
  • Hide status bar/set status bar color

    : Only takes effect when WebApp full-screen mode is turned on. The value of content is default | black | black-translucent.

    1

    <meta>

    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
  • Title after adding to home screen

    1

    <meta>

    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login

Summary of some commonly used metasSummary of some commonly used metasSummary of some commonly used metas

  • Ignore digits automatically recognized as phone numbers

    1

    <meta>

    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    ## Ignore identifying email
  • 1

    <meta>

    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Add Smart App Advertising Banner Smart App Banner
  • : Tell the browser the app corresponding to this website, and Display the download banner on the page (as shown below). Reference document

    1

    <meta>

    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login

![Alt text](./IMG_3701.jpg)

##Other
    Reference document
  • 1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    11

    12

    13

    14

    15

    16

    17

    18

    <!-- 针对手持设备优化,主要是针对一些老的不识别viewport的浏览器,比如黑莓 --><strong>

    <meta>

    <!-- 微软的老式浏览器 -->

    <meta>

    <!-- uc强制竖屏 -->

    <meta>

    <!-- QQ强制竖屏 -->

    <meta>

    <!-- UC强制全屏 -->

    <meta>

    <!-- QQ强制全屏 -->

    <meta>

    <!-- UC应用模式 -->

    <meta>

    <!-- QQ应用模式 -->

    <meta>

    <!-- windows phone 点击无高光 -->

    <meta></strong>

    Copy after login
    Web page related

Statement encoding
  • ##

    1

    <meta>

    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
    Copy after login
  • Priority is given to using the latest version of IE and Chrome
  • 1

    2

    3

    4

    5

    <meta>

    <!-- 关于X-UA-Compatible -->

    <meta><!-- 使用IE6 -->

    <meta><!-- 使用IE7 -->

    <meta><!-- 使用IE8 -->

    Copy after login
  • Browser Kernel Control
: Many domestic browsers have dual kernels (webkit and Trident), webkit kernel High-speed browsing, IE kernel compatible with web pages and old websites. Websites that add meta tags can control which kernel rendering the browser chooses. Reference document
  • 1

     <meta>

    Copy after login
    The default kernel mode of domestic dual-core browsers is as follows: 1. Sogou high-speed browser, QQ browser: IE kernel (compatibility mode)
  •   2. 360极速浏览器、遨游浏览器:Webkit内核(极速模式)

    • 禁止浏览器从本地计算机的缓存中访问页面内容:这样设定,访问者将无法脱机浏览。

1

<meta>

Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
  • Windows 8

1

2

<meta> <!-- Windows 8 磁贴颜色 -->

<meta> <!-- Windows 8 磁贴图标 -->

Copy after login
  • 站点适配:主要用于PC-手机页的对应关系。

1

2

3

4

5

<meta>

<!--

[wml|xhtml|html5]根据手机页的协议语言,选择其中一种;

url="url" 后者代表当前PC页所对应的手机页URL,两者必须是一一对应关系。

 -->

Copy after login
  • 转码申明:用百度打开网页可能会对其进行转码(比如贴广告),避免转码可添加如下meta

1

<meta>

Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login

               

The above is the detailed content of Summary of some commonly used metas. For more information, please follow other related articles on the PHP Chinese website!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What is the purpose of the <progress> element? What is the purpose of the <progress> element? Mar 21, 2025 pm 12:34 PM

The article discusses the HTML &lt;progress&gt; element, its purpose, styling, and differences from the &lt;meter&gt; element. The main focus is on using &lt;progress&gt; for task completion and &lt;meter&gt; for stati

What is the purpose of the <datalist> element? What is the purpose of the <datalist> element? Mar 21, 2025 pm 12:33 PM

The article discusses the HTML &lt;datalist&gt; element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

What are the best practices for cross-browser compatibility in HTML5? What are the best practices for cross-browser compatibility in HTML5? Mar 17, 2025 pm 12:20 PM

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

What is the purpose of the <meter> element? What is the purpose of the <meter> element? Mar 21, 2025 pm 12:35 PM

The article discusses the HTML &lt;meter&gt; element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates &lt;meter&gt; from &lt;progress&gt; and ex

How do I use HTML5 form validation attributes to validate user input? How do I use HTML5 form validation attributes to validate user input? Mar 17, 2025 pm 12:27 PM

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

What is the viewport meta tag? Why is it important for responsive design? What is the viewport meta tag? Why is it important for responsive design? Mar 20, 2025 pm 05:56 PM

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

What is the purpose of the <iframe> tag? What are the security considerations when using it? What is the purpose of the <iframe> tag? What are the security considerations when using it? Mar 20, 2025 pm 06:05 PM

The article discusses the &lt;iframe&gt; tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

Gitee Pages static website deployment failed: How to troubleshoot and resolve single file 404 errors? Gitee Pages static website deployment failed: How to troubleshoot and resolve single file 404 errors? Apr 04, 2025 pm 11:54 PM

GiteePages static website deployment failed: 404 error troubleshooting and resolution when using Gitee...

See all articles