Detailed explanation of examples of meta tags in html

Y2J
Release: 2017-05-23 09:49:00
Original
2393 people have browsed it

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 and take a look.

meta tag function

META tag is one of the HTML tagsHEADarea Key tags provide basic information such as documentcharacter set, language used, author, etc., as well as settings for keywords and web page levels. The biggest role is to enablesearchengine optimization ( SEO).

PS: It is convenient for search engine robots to search and classify. 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/HTMLCodeCopy content to clipboard

    ##< ;
  1. metacharset="gbk">

  2. <
  3. metaname="description"content="Jingdong JD.COM-Professional comprehensive The online shopping mall sells tens of thousands of brands of 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!"><

  4. metaname="Keywords"content="Online shopping, online shopping mall, mobile phone, notebook, computer, MP3, CD, VCD, DV, camera, digital, accessories, watch, memory card, Jingdong">Meta settings for Taobao homepage:

##XML/HTML Code

Copy content to clipboard

     
Copy after login
Meta settings for youku homepage:

XML/HTML Code

Copy content To clipboard

    
Copy after login
Meta settings of Douyu homepage:

XML/HTML Code

Copy content to clipboard

    
Copy after login
Meta settings for Tencent homepage:

XML/HTML Code

Copy content to clipboard

     
Copy after login
Meta settings for the home page of Qidian Novel Network:

XML/HTML Code

Copy content to the clipboard

               
Copy after login
meta detailed explanation

meta tag can be divided into two parts: http-equiv and namevariable.

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 correctly Display web page content.

Value

name

nameAttributeis mainly used to describe the web page. The corresponding attribute value is content. The content in content is mainly for search engine robots to find. Information and classification information.

Description Set the character set used by the page 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 expires Set the expiration time of the web page. refresh to automatically refresh and point to the new page. set-cookie If the web page expires, then automatically windows-target Forcing 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 others cache-control Caching mechanism
Example content-type
When

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

PS: The method for html5 pages is to directly use

X-UA-Compatible Special tag for IE8, used to specify IE8 browser to simulate a specific version ofIE browserrendering method to solve some compatibility issues.

The above code tells the IE browser whether or notDTD# is used ##State 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

FrameGCF), this plug-in can keep the user's IE browser unchanged, but when users browse the web, they actually use the Google Chrome browser core, and supports multiple versions such as IE6, 7, and 8. IE browser.

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

DeleteLocal cookies. 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.


is used to control page zoom maximum-scale=1, minimum-scale=1, user-scalable=no"> 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 generator Describe the software used to create the website ##revised robots Value: all|none|index|noindex|follow|nofollow, default all copyright
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
PS: 360 browser supports

Revision time of web document
is used to tell the search robot which pages need to be indexed and which pages do not need to be indexed.

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.

Website copyright information

Summary

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

【Related recommendations】

1.

Html free video tutorial

2.Share an integration of HTML knowledge points

3.Solution to various situations where divs are covered by iframes

4.Teach you how to insert links in html

5.Teach you how to parse html under nodejs

The above is the detailed content of Detailed explanation of examples of meta tags in html. 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!