The role of meta name="" content=" is introduced in detail _HTML/Xhtml_ web page production

1. Grammar: <meta name="name" content="string"/>  2. Parameter analysis: a. Name item: commonly used options are keywords (keywords), description (website content description), author (author), robots (robot guide) and so on. b, http-equiv item: can be used to replace the name item, commonly used options are Expires (period), Pragma (cache mode), Refresh (refresh), Set-Cookie (cookie setting), Window-target (display window setting) setting), content-Type (display character set settings), etc. c. Content item: According to the definition of the name item or http-equiv item, decide what kind of string to fill in this 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:  <meta http-equiv="Content -Type" content="text/html; charset=gb2312" />  b. Let some search engines search your web page, the code can be written like this:  <meta name="keywords" content="web page keywords" />  < meta name="description" content="web page description text" />  To achieve the automatic search engine can really easily search your web page, you have to pay attention to the following points:  


 




 






1. It is necessary to define both the meta tag item and the first 200 characters of the home page body as text that reflects the theme of the home page. Because some navs index the first 200 characters in the text while indexing the keywords in the meta item. Such as: altavista. Therefore, when some people check the registration result after registering the navigation console, they find that the description in the navigation console is not what you expected, but words such as copyright notices. The reason for this phenomenon is that it was not noticed. 
2. Put 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="...,....,. .."/> 
3. Put the most important keywords at the top, and let related keywords be adjacent. All lowercase and uppercase coexist, because some navigation consoles are sensitive to the case of characters when indexing. The number of words including punctuation should not exceed 250 words 
. 4. It is best not to use the frame structure for the home page, because after the frame divides the screen into multiple windows, the navigation console cannot intelligently select the home page in the correct window to index. 
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 /" /> 
The 6 in the content represents the time, in seconds, followed by the URL you want to redirect to. If it is in the same directory as your current web page, you can directly write the file name, such as: 
<meta http-equiv= "refresh" content="6; 

<meta http-equiv="refresh" content="10"> 
e. Through Meta, you can make some special effects when you enter the page. The specific application is as follows: 
<meta http-equiv="Page-Enter" content= "revealTrans( Duration=5.0,Transition=n)" /> Among them, the value range of n is 0-23, and the specific meaning is as follows: 
0 Rectangle shrinks 1 Rectangle expands 2 Circular shrinks 
3 Circle expands 4 Bottom to top

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326176408&siteId=291194637