Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

& the function of lt;meta> tag

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

It is a pair of tags, functions and changes placed between and, so I introduce it in a formulaic way.

The description of the page acts on the login of the search engine.

The keywords of the web page act on the login of the search engine.

The function of the above lines is the same, all ask the browser to reload the page, do not use the cache function, of course, you can change the Expire (expiration) time.

Set this to be a HTML file and its coding language family, simplified Chinese web pages use charset=gb2312, traditional Chinese use charset=big5, or no coding, pure English web pages are recommended to use iso-8859-1.

This only indicates what editor the page was written by.

This line is more practical and can be automatically redirected to the specified URL within a predetermined number of seconds. 10 in the original code represents 10 seconds.

Meta is a response header message used to simulate the HTTP protocol in HTML documents. The meta tag is used in < head > and < / head > of a web page, and the meta tag is of many uses. There are two properties of meta: name and http-equiv. The name attribute is mainly used to describe web pages, corresponding to content (web content), so as to facilitate search engine robots to find and classify web pages (almost all search engines use web robots to automatically find meta values to classify web pages). The most important of these are description (description of the site on the search engine) and keywords (classification keywords), so you should add a metastatic value to each page. The more commonly used ones are as follows:

Name attribute

1. < meta name= "Generator" contect= "" > is used to describe generation tools such as Microsoft FrontPage 4.0, etc.

2. < meta name= "KEYWords" contect= "" > explains the keywords of your web page to the search engine.

3. < meta name= "DEscription" contect= "" > tells the search engine the main content of your site.

4. < meta name= "Author" contect= "your name" > tell the search engine the author of your site.

5. < meta name= "Robots" contect= "all | none | index | noindex | follow | nofollow" >

The attributes are described as follows:

Set to all: the file will be retrieved and the links on the page can be queried

Set to none: files will not be retrieved and links on the page cannot be queried

Set to index: the file will be retrieved

Set to follow: links on the page can be queried

Set to noindex: files will not be retrieved, but links on the page can be queried

Set to nofollow: files will not be retrieved and links on the page can be queried.

Http-equiv attribute

1. < meta http-equiv= "Content-Type" contect= "text/html"; charset=gb_2312-80 ">

And < meta http-equiv= "Content-Language" contect= "zh-CN" > are used to illustrate the text and language used to make the home page.

For example, English is the ISO-8859-1 character set, as well as BIG5, utf-8, shift-Jis, Euc, Koi8-2 and other character sets.

2. < meta http-equiv= "Refresh" contect= "ntransferurl = http://yourlink" > regularly let the web page jump to the page http;//yourlink within the specified time n.

3. < meta http-equiv= "Expires" contect= "Mon,12 May 2001 00:20:00 GMT" > can be used to set the expiration time of a web page. Once it expires, it must be called again on the server. It is important to note that the GMT time format must be used

4. < meta http-equiv= "Pragma" contect= "no-cache" > is set to prevent browsers from accessing page content from the local cache. Once you leave the page, you cannot call it out of Cache.

5. < meta http-equiv= "set-cookie" contect= "Mon,12 May 2001 00:20:00 GMT" > cookie setting that if the web page expires, the saved cookie will be deleted. It should also be noted that the GMT time format must be used.

6. < meta http-equiv= "Pics-label" contect= "> page rating. There is a content setting in the internet option of IE to prevent browsing some restricted websites, and the restriction level of the website is set through the meta attribute.

7. < meta http-equiv= "windows-Target" contect= "_ top" > forces the page to be displayed as a separate page in the current window, which can prevent your own page from being called as a frame page.

< meta http-equiv= "Page-Enter" contect= "revealTrans (duration=10,transtion=50)" > and < meta http-equiv= "Page-Exit"

Contect= "revealTrans (duration=20,transtion=6)" > sets the special effect when entering and leaving the page, that is, the "format / page transition" in FrontPage, but the added page cannot be a frame page.

META tags are used to describe the properties of a HTML web document, such as author, date and time, page description, keywords, page refresh, etc.

In the content about search engine registration, search engine optimization ranking and other network marketing methods, we usually talk about the role of META tags. We can even say that the content design of META tags is a crucial factor for search engine marketing. In particular, the two attributes of "description" (web description) and "Keywords" (keywords) are more important [see the special article introduction to the online marketing teaching website: description Keywords]. Although today's search engines rarely rely on the content in META tags to determine the ranking of search results, the content design of META tags is still very important.

As you can see from the HTML code example, there are three places in a piece of code that contain meta, and meta does not exist independently, but connects other attributes, such as description, Keywords, http-equiv, and so on. The following is a brief introduction to the composition and role of some common META tags in search engine marketing.

The META tag can be divided into two parts: HTTP-EQUIV and NAME variables.

1. About HTTP-EQUIV in the META tag

One item in the HTML code example is

Its function is to specify that the character encoding used in the current document is gb2312, that is, simplified Chinese characters. According to this line of code, the browser can recognize that the web page should be displayed in simplified Chinese characters. Similarly, if we replace "gb2312" with "big5", we are familiar with traditional Chinese characters.

HTTP-EQUIV is used to provide some explanatory information to the browser so that you can make a response according to these instructions. In fact, HTTP-EQUIV does not only describe the character encoding of the web page, the commonly used HTTP-EQUIV types include: the expiration time of the web page, the default scripting language, the default style page language, the automatic refresh time of the web page and so on.

2. About the "description" in the META tag

The code in the "description" in the HTML code example is:

The content= "page description" in "description" is an introduction to a web page overview, which may appear in the search results, so it is necessary to design according to the actual situation of the page and try to avoid "description" that is not related to the content of the page. In addition, it is best to have a corresponding description for each page (at least a page with the same column). Instead of using the same description content for the whole site, because a website has multiple pages, and the content of each page must be different, if you use the same description, it is obvious that some page contents are not directly related, which is not only not conducive to the ranking of pages by search engines, but also not conducive to users to judge whether to click into the site to obtain further information according to the information in the search results.

3. About the "Keywords" in the META tag

Similar to the "description" in the META tag, "Keywords" is also used to describe the attributes of a web page, except that the content listed is "keyword", not an introduction to the page. This means choosing the right keywords according to the theme and content of the page. When selecting keywords, in addition to considering the core content of the page, it should also be easy for users to retrieve through search engines, and words that are too obscure are not suitable to be keywords in META tags. With regard to the design of keywords in META tags, we should be careful not to pile up too many keywords. Listing a large number of keywords does not make much sense for search engines, for some popular areas (that is, a large number of similar websites), and may even have side effects.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report