Header information optimization

In many cases, when we make the homepage, we will ignore the settings of the page header attributes. The header attribute of the webpage refers to the area of ​​the html file that is affected by the <head> identifier. The header information of the html file includes the collection of some information about the current file. After the attributes of the <head> area are modified, it will not be directly Affect the visual effect of the file. But by setting it up, it will make our homepage production process more standardized and more convenient to use.

Now let's take a look at how to set some homepage header attributes:
  
  1. meta identifier

The meta identifier is the head element of the homepage to record some important information of the current page, such as the character set, author, version, and keywords of the webpage.
  For example:
 <meta name="robots" c />
<meta name="author" chttp://www.073.cc/" target=_blank>www.073.cc" />
<meta name="Copyright" c />
<link rel="stylesheet" href="css/css.css" _fcksavedurl=""css/css.css"" _fcksavedurl=""css/css.css"" type="text/css" media=" all" />
<meta name="description" c />
<meta name="keywords" c />
  where the content of "name" means that the meta identifier contains description information about the current page, and "http-equiv" means It is the http header information (http-equiv).

2. Insert keyword attributes

Nowadays, many popular search engine robots on the Internet can read the keyword attributes in meta identifiers and index them in their databases based on the information provided. When the viewer enters the relevant keyword search on the search website, your webpage address will be listed among them. But some search engines will limit the number of your keywords, and redundant keywords will be ignored.
  For example:
<meta name="keywords" c /> …
  where "keywords" is the keyword, and "content" is the attribute of the keyword.

3. Insert a brief description of the page attribute

Similar to the nature of keywords, a web page introduction is to provide search engine robots with a general introduction to the current page. There are also some search engines that limit the number of words in your introduction.
  Example:
<meta name="description" c />

4. Insert web page refresh attributes

For example:
  <meta http-equiv=”refresh” content=”5;url=http://www.073.cc”>
  This code means: 5 seconds after the web page, the current page will automatically jump to "http ://www.073.cc". Among them, the "5" in "content" means that the interval is 5 seconds, and it can also be changed to "3", "4" and other times, which are determined by the webpage author; "url" is followed by other pages that you want to jump to address.

<meta http-equiv=”refresh” content=”3”>
  This piece of code means that the current page is automatically refreshed after 3 seconds. The "3" in "content" means that the interval is 3 seconds, and it can also be changed to other times such as "4" and "5", which are also set by the author of the page.

5. Insert page base link attributes

If all links in one of your pages use relative path links, and you want to change them to the same absolute path link on the Internet, you can do so by setting the properties of the web page base link.
  For example:
  <base href=”http://www.073.cc” target=”_blank”>
  As above, all relative paths on your webpage will be linked with “http://www.073. cc/". Among them, "target="_blank"" means that the linked file is opened in a new window, and you can make other settings. Changing "_blank" to "_parent" means that the linked file will be opened in the parent window of the current window; changed to "_self" to open the linked file in the current window (frame); changed to "_top" to display the linked file in full screen.

Guess you like

Origin blog.csdn.net/bealei/article/details/103899429