search
HomeWeb Front-endHTML TutorialDetailed explanation of the usage of meta tags in html

The following will bring you a summary of the use of html meta tags (recommended). The editor thinks it’s pretty good, so I’ll share it with you now and give it as a reference. Let’s follow the editor to take a look

meta tag function

The META tag is a key tag in the HEAD area of ​​the HTML markup, providing document characters Basic information such as collection, language, author, etc., as well as settings for keywords and web page levels, etc., are most useful for search engine optimization (SEO).

PS: It is convenient for search engine robots to search and classify, so Internet applications should pay attention to it.

How to write large websites?

Before understanding this tag, I searched for their Meta settings on various mainstream websites, as follows:

Meta settings on JD.com’s homepage:


##XML/HTML CodeCopy content to clipboard

  1. meta charset="gbk">

  2. meta name="description" content="JD.COM- A professional comprehensive online shopping mall that sells tens of thousands of branded high-quality products such as home appliances, digital communications, computers, household department stores, clothing, maternal and infant products, books, food, etc. Convenient and honest services provide you with a pleasant online shopping experience! ">

  3. ##meta name= "Keywords" content="Online shopping, online mall, mobile phone, notebook, computer, MP3, CD, VCD, DV, camera, digital, accessories, watch, memory card, Jingdong ">
Meta settings on Taobao homepage:


XML/HTML Code

Copy content to clipboard

    ##

    meta charset="utf-8">

    ##
  1. meta

    http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">##

  2. meta
  3. name="renderer" content="webkit">##

    meta
  4. name

    ="spm-id" content="a21bo">

    meta
  5. name

    ="description" content="Taobao - Asia's largest and safest online trading platform, providing all kinds of clothing, beauty, home, digital, phone/point card recharge... 800 million high-quality special offers, and also provides guaranteed transactions (receive first, pay later) , advance compensation, three-for-one compensation for fakes, seven-day no-reason returns and exchanges, free digital maintenance and other safe transaction guarantee services, allowing you to fully enjoy the fun of online shopping with peace of mind! ">##meta

  6. name
  7. =

    "keyword" content="">Meta settings for youku homepage :

##XML/HTML CodeCopy content to clipboard

  1. meta charset="utf-8">

  2. ##meta http-equiv="X-UA-Compatible" content="IE=Edge">

  3. ##meta name="title" content="Youku - China's leading video website, providing video playback, video publishing, and video search - Youku Video" />
  4. ##

    #meta name ="keywords" content="Video, video sharing, video search, video playback, Youku video" />

    meta name="description" content= "Video service platform, providing video playback, video publishing, video search, video sharing" />

    ## Douyu Meta settings for home page:

XML/HTML Code

Copy content to clipboard

  • meta

    http-equiv="Content-Type" content= "text/html; charset=utf-8" />##

  • meta
  • name="renderer" content="webkit|ie-comp|ie-stand">

  • meta
  • http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">##< ;

    meta
  • name

    ="keywords" content="DOTA2, popular game live broadcast, game live broadcast, high definition Game live broadcast, mobile game live broadcast, e-sports live broadcast" />##meta

  • name
  • =

    "description" content="Douyu - the national live broadcast platform provides high-definition, fast and smooth video live broadcast and game event live broadcast services. It includes live broadcasts of various popular game events such as DOTA2 and various famous game live broadcasts. It is rich in content and timely pushed, giving you a different audio-visual experience. It is all on Douyu - the national live broadcast platform. " /> Meta settings on Tencent homepage:

  • XML/HTML Code

    Copy content to clipboard


    ##meta

    charset
      =
    1. "UTF-8"

      >##meta name

      =
    2. "renderer"
    3. content="webkit" />

    4. meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    5. ##meta name="keywords" content="News News Center Fact News Channel, Current Affairs Report">

    6. ##meta name="description" content="Tencent News, fact-based. News center, including current affairs news, domestic news, international news, social news, current affairs commentary, news pictures, news topics, news forums, military, history , a professional current affairs reporting portal">
    7. ##

      meta name ="author" content="skeetershi" />

      Meta settings for the home page of Qidian Novel Network:


    XML/HTML Code

    Copy content to clipboard

      meta name="keywords" content="Novel, novel network, romance novels, youth novels, fantasy novels, martial arts novels, urban novels, historical novels, online novels, original online literature" />

      ##
    1. meta

      name="description" content ="Novel reading, wonderful novels are all in Qidian Novels. Qidian Novels provides fantasy novels, martial arts novels, original novels, online game novels, urban novels, romance novels, youth novels, historical novels, military novels, online game novels, science fiction novels , horror novels, free novel reading of the latest chapters of the first novels, all the excitement is in Qidian novels! ver:071011 Popular novels: "#. meta

    2. http-equiv
    3. =

      "Content-Type" id="meta_ContentType" content="text/html;charset=UTF-8" />meta

    4. name
    5. =

      "robots" content="all" />##meta

      name
    6. =
    7. "googlebot"

      content="all" />## meta name

      =
    8. "baiduspider"
    9. content="all" /> meta name

      =
    10. "copyright"
    11. content="The copyright of this page www.qidian.com is owned by Qidian Chinese Network. All Rights Reserved" />

    12. meta http-equiv="mobile-agent" content="format=wml; url=http://m.qidian.com" />meta http-equiv="mobile-agent" content="format=xhtml; url=http://m.qidian.com" />meta http-equiv="mobile-agent" content="format=html5; url=http://h5.qidian.com/bookstore.html" />

    13. meta name="application-name" content="Starting point Chinese Novel Network" /

    14. ##meta name="msapplication-starturl " content="/Default.aspx?_s=ie9" />

    15. meta name="msapplication-tooltip" content="Novel reading_starting point Chinese Novel Network | Free novels, fantasy novels, martial arts novels, romance novels, youth novels, novel downloads of all kinds from Novel Network" />

    16. meta name="msapplication-task" content="name=Qidian Mini Game ;action-uri=http://game.qidian.com/?_s=ie9;icon-uri=http://www.qidian.com/Images/ie9/game.ico" /> ;

    17. meta name="msapplication-task" content="name=Bookcase;action-uri=http://me.qidian.com/BookCase/1/1?_s=ie9;icon-uri=http://www .qidian.com/Images/ie9/book.ico" />

    18. meta name="msapplication-task" content="name=Reading Client;action-uri=http://c.qidian .com/android/?_s=ie9;icon-uri=http://www.qidian.com/Images/ie9/phone.ico" />

    19. meta name="msapplication-task" content="name=ranking list;action-uri=http://top.qidian.com/?_s=ie9;icon-uri=http://www.qidian.com/Images/ie9/chart.ico" />

    20. ##meta name="msapplication -task" content="name=search;action-uri=http://sosu.qidian.com/?_s=ie9;icon-uri=http://www .qidian.com/Images/ie9/search.ico" />
    21. meta property="qc:admins" content="204236767661141166375" />

    meta detailed explanationmeta tag can be divided into two parts: http-equiv and name variables.

    http-equiv

    http-equiv is equivalent to the file header of http. It can return some useful information to the browser to help the browser display web page content correctly.

    # #X-UA-CompatibleSpecial tag for IE8, used to specify the IE8 browser to simulate the rendering method of a specific version of IE browser to solve some compatibility issues. expiresSet the expiration time of the web page. ​ ​ ​ refresh to automatically refresh and point to the new page. set-cookieIf the web page expires, it will be automatically deleted Local cookies. ​ ​ ​ ​ windows-targetForcing the page to be displayed as an independent page in the current window can prevent your own web page from being called as a frame page by otherscache-controlCaching mechanism ​ ​ ​ ​

    name

    The name attribute is mainly used to describe web pages, and the corresponding attribute value is content. The content in content is mainly used by search engine robots to find information and classify information. .

    Value Description Example
    content-type Set the character set used by the page When

    GB2312, it means that the encoding used by the website is Simplified Chinese; when

    ISO-8859-1, it means that the encoding used by the website is English; when

    UTF-8 , represents the world's universal language encoding;

    PS: The method for html5 pages is to directly use

    The above code tells the IE browser whether or not a DTD is used to declare the document standard. IE8/9 will use the IE7 engine to render the page.

    The above code tells the IE browser that IE8/9 will use the IE8 engine to render the page.
    The above code tells the IE browser that IE8/9 and later versions will use the highest version of IE to render the page.

    The above code IE=edge tells IE to use the latest engine to render web pages, and chrome=1 can activate Chrome Frame.

    PS: Google adds a plug-in: Google Chrome Frame (Google Embedded Browser Framework GCF ), this plug-in can keep the user's IE browser unchanged, but when browsing the web, the user is actually using the Google Chrome browser core, and supports multiple versions of IE browsers such as IE6, 7, and 8.

    PS: The GMT time format must be used

    PS: 2 means that the page will stay for 2 seconds and then jump to the following URL

    PS: GMT time format must be used.

    Public: Indicates that the response can be cached by any cache area.

    Private: Indicates that all or part of the response message for a single user cannot be processed by the shared cache. This allows the server to only describe a partial response from a user that is not valid for other users' requests.

    no-cache: Indicates that the request or response message cannot be cached.

    no-store: Used to prevent important information from being released unintentionally. Sending it in the request message will cause both the request and response messages to use caching.

    max-age: Indicates that the client can receive responses with a lifetime no greater than the specified time (in seconds).

    min-fresh: Indicates that the client can receive responses with a response time less than the current time plus the specified time.

    max-stale: Indicates that the client can receive response messages beyond the timeout period. If you specify a value for max-stale messages, the client can receive response messages that exceed the specified value of the timeout period.

    ##revisedRevision time of web documentrobots is used to tell the search robot which pages need to be indexed and which pages do not need to be indexed. copyrightWebsite copyright information
    Value Description Example
    author Annotation The author of the web page
    keywords Page keywords, used for Indexed by search engines
    description Page description, used for search engine inclusion
    viewport is used to control page zoom
    renderer Specify how dual-core browsers render pages by default. //Default webkit kernel//Default IE compatibility mode< ;meta name="renderer" content="ie-stand">//Default IE standard mode

    PS: 360 browser supports

    generator Describe the software used to create the website
    Value: all|none|index|noindex|follow|nofollow, default all

    all: the file will be retrieved, and the links on the page can be queried;

    none: The file will not be retrieved, and the links on the page cannot be queried;

    index: the file will be retrieved;

    follow: the links on the page can be queried;

    noindex: The file will not be retrieved, but the links on the page can be queried;

    nofollow: The file will not be retrieved, but the links on the page can be queried.

    SummaryThrough the big website for meta In the settings, you can see that the commonly used ones are X-UA-Compatible, keywords, and description.

    The above summary of the use of html meta tags (recommended) is all the content shared by the editor. I hope it can give you a reference, and I also hope that everyone will support Script Home.

    The above is the detailed content of Detailed explanation of the usage of meta tags in html. For more information, please follow other related articles on the PHP Chinese website!

    Statement
    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
    HTML: Is It a Programming Language or Something Else?HTML: Is It a Programming Language or Something Else?Apr 15, 2025 am 12:13 AM

    HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

    HTML: Building the Structure of Web PagesHTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AM

    HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

    From Text to Websites: The Power of HTMLFrom Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AM

    HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

    Understanding HTML, CSS, and JavaScript: A Beginner's GuideUnderstanding HTML, CSS, and JavaScript: A Beginner's GuideApr 12, 2025 am 12:02 AM

    WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

    The Role of HTML: Structuring Web ContentThe Role of HTML: Structuring Web ContentApr 11, 2025 am 12:12 AM

    The role of HTML is to define the structure and content of a web page through tags and attributes. 1. HTML organizes content through tags such as , making it easy to read and understand. 2. Use semantic tags such as, etc. to enhance accessibility and SEO. 3. Optimizing HTML code can improve web page loading speed and user experience.

    HTML and Code: A Closer Look at the TerminologyHTML and Code: A Closer Look at the TerminologyApr 10, 2025 am 09:28 AM

    HTMLisaspecifictypeofcodefocusedonstructuringwebcontent,while"code"broadlyincludeslanguageslikeJavaScriptandPythonforfunctionality.1)HTMLdefineswebpagestructureusingtags.2)"Code"encompassesawiderrangeoflanguagesforlogicandinteract

    HTML, CSS, and JavaScript: Essential Tools for Web DevelopersHTML, CSS, and JavaScript: Essential Tools for Web DevelopersApr 09, 2025 am 12:12 AM

    HTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.

    The Roles of HTML, CSS, and JavaScript: Core ResponsibilitiesThe Roles of HTML, CSS, and JavaScript: Core ResponsibilitiesApr 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.

    See all articles

    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 agoBy尊渡假赌尊渡假赌尊渡假赌
    R.E.P.O. Best Graphic Settings
    4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
    R.E.P.O. How to Fix Audio if You Can't Hear Anyone
    4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
    WWE 2K25: How To Unlock Everything In MyRise
    1 months agoBy尊渡假赌尊渡假赌尊渡假赌

    Hot Tools

    PhpStorm Mac version

    PhpStorm Mac version

    The latest (2018.2.1) professional PHP integrated development tool

    SublimeText3 English version

    SublimeText3 English version

    Recommended: Win version, supports code prompts!

    WebStorm Mac version

    WebStorm Mac version

    Useful JavaScript development tools

    SAP NetWeaver Server Adapter for Eclipse

    SAP NetWeaver Server Adapter for Eclipse

    Integrate Eclipse with SAP NetWeaver application server.

    Zend Studio 13.0.1

    Zend Studio 13.0.1

    Powerful PHP integrated development environment