Many times, we ignore the setting of the web page header attributes when making the homepage. The header attributes of a web page refer to the area in the Html file affected by the <Head> identifier. The header information of the Html file includes a collection of some information about the current file. Modifying the attributes of the <Head> area will not directly affect the visual effect of the file. But by setting it up, our homepage production process will be more standardized and easier to use. Now let's take a look at how to set some homepage header properties: 1. META identifier The META identifier is the header element of the homepage used to record some important information of the current page, such as the character set, author, version, web page keywords, etc. For example: <head> .............. <meta http-equiv=″Content-Type″ content=″text/html; charset=gb2312″> <meta name=″Computer Software and Hardware Application Network″ content=″Produced by Computer Software and Hardware Application Network Studio″> <meta name=″Version″ content=″Third revision″> <meta name=″content″ content=″software download, use, homepage creation, make money, navigation...″> .............. </head> The content of "name" indicates that the META identifier contains descriptive information about the current page, and "http-equiv" indicates HTTP header information (HTTP-EQUIV). 2. Insert keyword attributes <br />Many popular search engine robots on the Internet today can read keyword attributes in META identifiers and index them in their databases based on the information provided. When visitors enter relevant keywords in the search site, your web page address will be included. But some search engines will limit the number of your keywords, and extra keywords will be ignored. For example: <meta name=″keywords″ content=″Computer Software and Hardware Application Network Studio, https://www.jb51.net″> <meta name=″keywords″ content=″software download, software usage, homepage creation, navigation″> Among them, "keywords" refers to keywords, and "content" refers to the attributes of keywords. 3. Insert the web page description attribute <br />Like the nature of keywords, the web page introduction provides the search engine robot with a general introduction to the current web page. Similarly, some search engines will limit the number of words in your introduction. Example: <meta name=″description″ content=″Computer Software and Hardware Application Network (https://www.jb51.net)-Computer Software and Hardware Application Network Studio, Mavericks″> 4. Insert web page refresh attribute For example: <meta http-equiv=″refresh″ content=″5;URL=https://www.jb51.net″> This code means: after 5 seconds, the current page will automatically jump to "https://www.jb51.net". The "5" in "content" means the interval is 5 seconds, which can also be changed to "3", "4" or other times, which is determined by the web page author; "URL" is followed by the address of the other page you want to jump to. <meta http-equiv=″refresh″ content=″3″> This code means: after 3 seconds, the current page will be automatically refreshed. The "3" in "content" means the interval is 3 seconds. It can also be changed to "4", "5" or other times, which is also determined by the web page author. 5. Insert web base link properties <br />If all the links in a page of yours use relative path links, and you want to change them all to the same absolute path links on the Internet, you can do this by setting the web base link properties. For example: <base href=″https://www.jb51.net/″ target=″_blank″> As above, all relative paths on your web pages will be preceded by "https://www.jb51.net/" when linked. Among them, “target=″_blank″” means that the link file is opened in a new window, and you can make other settings. Changing “_blank” to “_parent” means the linked file will be opened in the parent window of the current window; changing it to “_self” means the linked file will be opened in the current window (frame); changing it to “_top” means the linked file will be displayed in full screen. The above are some tips for setting the header attributes of a web page. I hope it can be helpful to the majority of netizens who make homepages. The author Xiao Niu hopes that everyone can make our online home (personal homepage) more beautiful by exchanging experiences and insights on homepage production with each other! |
<<: Use CSS to create 3D photo wall effect
>>: React Routing Link Configuration Details
Install Jenkins via Yum 1. Installation # yum sou...
When the same function and HTML code are used mul...
background Ever wondered how to create a shadow e...
Table of contents Question: Case (1) fork before ...
Table of contents 1. Introduction 2. Principle II...
Today, I want to write about a "low-tech&quo...
Do you know what fonts are used in the logo desig...
Table of contents 1 Introduction to nginx 1 What ...
In the front-end layout of the form, we often nee...
Develop a number guessing game that randomly sele...
This article example shares the specific code of ...
Table of contents 1. What is a prototype? 1.1 Fun...
As shown below: Copy the remote server's file...
Generally, during Qingming Festival, the National...
Regardless of which version of Ubuntu, installing...