Table of Contents
Summary
SEO Optimization
Mobile devices
Home Web Front-end HTML Tutorial html commonly used meta organization_html/css_WEB-ITnose

html commonly used meta organization_html/css_WEB-ITnose

Jun 24, 2016 am 11:40 AM

< meta > Element

Summary

The

tag provides metadata about the HTML document. 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

属性 值 描述
content some text 定义与http-equiv或name属性相关的元信息

Optional attributes

属性 值 描述
http-equiv content-type / expire / refresh / set-cookie 把content属性关联到HTTP头部。
name author / description / keywords / generator / revised / others 把 content 属性关联到一个名称。
content some text 定义用于翻译 content 属性值的格式。

SEO Optimization

  • 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 page. Mark content that is too short and search engines may not consider it relevant. Also tags should not exceed 874 characters.
  • <meta name="keywords" content="your tags" />
    Copy after login
  • Page Description Each web page should have a description tag of no more than 150 characters that accurately reflects the content of the page.
  • <meta name="description" content="150 words" />
    Copy after login
  • Search engine indexing method , robotterms is a set of values ​​separated by commas (,), usually the following values: none, noindex, nofollow, all, index and follow. Make sure you use the nofollow and noindex attribute values ​​correctly.
  • <meta name="robots" content="index,follow" /><!-- 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 much time will it take 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).
  • <meta http-equiv="refresh" content="0;url=" />
    Copy after login
  • Others
  • <meta name="author" content="author name" /> <!-- 定义网页作者 --><meta name="google" content="index,follow" /><meta name="googlebot" content="index,follow" /><meta name="verify" content="index,follow" />
    Copy after login

    Mobile devices

  • 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.
  • <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/><!-- `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 (number/device-height) (Range from 223 to 10,000)
    3. initial-scale: Initial scaling (Range from >0 to 10)
    4. minimum-scale: Minimum scale the user is allowed to zoom to
    5. maximum-scale: The maximum ratio the user is allowed to zoom to
    6. user-scalable: Whether the user can manually zoom (no, yes)
    7. minimal-ui: Can be minimized when the page is loading Change the status bar up and down. (Deprecated)

    Note that many people use initial-scale=1 on non-responsive websites, which causes the website to render at 100% width and the user needs 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.
  • <meta name="apple-mobile-web-app-capable" content="yes" /> <!-- 启用 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.
  • <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    Copy after login
  • Title after adding to home screen
  • <meta name="apple-mobile-web-app-title" content="标题">
    Copy after login

  • Ignore numbers automatically recognized as phone numbers
  • <meta content="telephone=no" name="format-detection" /> 
    Copy after login
  • Ignore recognition email
  • <meta content="email=no" name="format-detection" />
    Copy after login
    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

    Video Face Swap

    Video Face Swap

    Swap faces in any video effortlessly with our completely free AI face swap tool!

    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

    Is HTML easy to learn for beginners? Is HTML easy to learn for beginners? Apr 07, 2025 am 12:11 AM

    HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

    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 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

    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.

    The Roles of HTML, CSS, and JavaScript: Core Responsibilities The Roles of HTML, CSS, and JavaScript: Core Responsibilities Apr 08, 2025 pm 07:05 PM

    HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

    What is an example of a starting tag in HTML? What is an example of a starting tag in HTML? Apr 06, 2025 am 12:04 AM

    AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.

    See all articles