This time I will bring you how to use meta name="" content=", what are the precautions for using meta name="" content=", what are the precautions, the following is a practical case, let's take a look one time.
1. Grammar:
<meta name="name" content="string"/>
2. Parameter analysis:
a. Name item: Commonly used options include keywords (keywords), description (website content description), author (author), robots (robot guide), etc.
b, http-equiv item: can be used to replace the name item. Commonly used options include Expires (period), Pragma (cache mode), Refresh (refresh), Set-Cookie (cookie setting) , Window-target (setting of display window), content-Type (setting of display character set ), etc.
c, content item: Determine what kind of string to fill in this item based on the definition of the name item or http-equiv item.
3. Application
a. Tell the browser the file type and language type recognized by the web page. For example, if we want the browser to recognize the Simplified Chinese web page of HTM/HTML type, we can write like this:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
b. Let some search engines search for your web page. The code can be written like this:
<meta name="keywords" content="网页关键字" /> <meta name="description" content="网页描述文字" />
Navigation
platforms not only index the keywords in the meta item, but also index the first 200 characters in the text. Such as: altavista. Therefore, when some people check the registration results after registering the navigation platform, they find that the description in the navigation platform is not what you expected, but text such as a copyright statement. The reason for this phenomenon is that this was not noticed. 2. Place the meta tag item that defines the keyword before the meta item that defines the description. For example:
<meta type="keywords" content=".......,...,..."/> <meta type="description" content="...,....,..."/>
c. Let a page pass a certain period of time and automatically go to another page or site, such as:
<meta http-equiv="refresh" content="6; url=http://hi.baidu.com/tesalo/" />
<meta http-equiv="refresh" content="6; url=page1.htm" />
<meta http-equiv="refresh" content="10">
<meta http-equiv="Page-Enter" content= "revealTrans(Duration=5.0,Transition=n)" /> 其中,n的取值范围为0-23,具体的意义如下:
I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to other related articles on the php Chinese website!
Related reading:
How to use anchor points in html web pagesWhat are the ways to hide HtmL elements?The above is the detailed content of meta name='' content='How to use. For more information, please follow other related articles on the PHP Chinese website!