Detailed explanation of meta tags (the role of meta tags)

Detailed explanation of meta tags (the role of meta tags)

No matter how wonderful your personal website is, it is still as hard to be found as a small boat in the vast ocean of cyberspace. How to promote your personal website? The first methods that people think of are nothing more than the following:

● Search your personal website in the search engine

● Add links to your personal website on well-known websites

● Post in forums to promote your personal website

However, many people ignore the powerful effect of the HTML tag META. A good META tag design can greatly increase the possibility of your personal website being searched. Are you interested? Let me re-acquaint you with the META tag!

The META tag is an auxiliary tag in the HEAD area of ​​the HTML language. It is located between the tag and the title<< tag in the head of the HTML document. It provides information that is invisible to users. The meta tag is usually used to define the page topic for search engine robots, or to define cookies on the user's browser; it can be used to identify the author, set the page format, mark the content summary and keywords; you can also set the page so that it can refresh itself according to the time interval you define, and set the RASC content rating, etc.

Detailed Introduction

Below are some examples and explanations of the relevant tags.

The META tag is divided into two parts: HTTP title information (HTTP-EQUIV) and page description information (NAME).

HTTP-EQUIV

HTTP-EQUIV is similar to the HTTP header protocol, which responds to the browser with some useful information to help display the web page content correctly and accurately. Common HTTP-EQUIV types are:

1. Content-Type and Content-Language (display character set settings) Reprinted from Global Online School edu24ol.com Reprinted from Global Online School edu24ol.com Reprinted from Global Online School edu24ol.com

Description: Set the character set used by the page to indicate the text and language used to create the homepage. The browser will call the corresponding character set to display the page content based on this.

Usage: <Meta http-equiv="Content-Type" Content="text/html; Charset=gb2312">

<Meta http-equiv="Content-Language" Content="zh-CN">

Note: This META tag defines the character set used by the HTML page as GB2132, which is the national standard Chinese character code. If you replace "charset=GB2312" with "BIG5", the character set used in the page will be Traditional Chinese Big5 code. When you browse some foreign sites, IE browser will prompt you to download xx language support to display the page correctly. This function is to read the Content-Type attribute of the META tag of the HTML page to find out which character set should be used to display the page. If the corresponding character set is not installed in the system, IE will prompt you to download it. Other languages ​​also correspond to different charsets, for example, the character set for Japanese is "iso-2022-jp" and the one for Korean is "ks_c_5601".

The Content of Content-Type can also be document types such as text/xml;

Charset options: ISO-8859-1 (English), BIG5, UTF-8, SHIFT-Jis, Euc, Koi8-2, us-ascii, x-mac-roman, iso-8859-2, x-mac-ce, iso-2022-jp, x-sjis, x-euc-jp, euc-kr, iso-2022-kr, gb2312, gb_2312-80, x-euc-tw, x-cns11643-1, x-cns11643-2, etc. The Content of Content-Language can also be language codes such as EN and FR.

2. Refresh (Refresh) Reprinted from Global Online School edu24ol.com Reprinted from Global Online School edu24ol.com Reprinted from Global Online School edu24ol.com

Description: How long (in seconds) does a web page need to refresh itself, or how long does it take for a web page to automatically link to other web pages.

Usage: <Meta http-equiv="Refresh" Content="30">

<Meta http-equiv="Refresh" Content="5; Url=http://www.xia8.net">

Note: The 5 means that it will automatically refresh to the URL after staying for 5 seconds.

3. Expires (terms) Reprinted from Global Online School edu24ol.com Reprinted from Global Online School edu24ol.com Reprinted from Global Online School edu24ol.com

Description: Specifies the expiration time of the web page in the cache. Once the web page expires, it must be retrieved from the server again.

Usage: <Meta http-equiv="Expires" Content="0">

<Meta http-equiv="Expires" Content="Wed, 26 Feb 1997 08:21:57 GMT">

Note: You must use the GMT time format, or set it to 0 (the number indicates how long it will expire).

4. Pragma (cach mode)

Description: Prevent the browser from accessing page content from the local machine's cache.

usage:

Note: The web page is not saved in the cache and is refreshed every time you visit it. With this setting, visitors will not be able to browse offline.

5. Set-Cookie (cookie setting)

Note: When a browser accesses a page, it will store it in the cache. The next time you access it, you can read it from the cache to increase the speed. When you want your visitors to refresh your ad icon every time, or refresh your counter every time, you should disable caching. Usually there is no need to disable caching for HTML files. However, for pages such as ASP, you can disable caching because the page you see each time is dynamically generated on the server, so caching becomes meaningless. If the web page expires, the saved cookies will be deleted.

Usage: <Meta http-equiv="Set-Cookie" Content="cookievalue=xxx; expires=Wednesday,

21-Oct-98 16:14:21 GMT; path=/">

Note: The time format must be GMT.

6. Window-target (display window settings)

Description: Force the page to be displayed as an independent page in the current window.

Usage: <Meta http-equiv="Widow-target" Content="_top">

Note: This attribute is used to prevent others from calling your page in a frame. Content options: _blank, _top, _self, _parent.

7. Pics-label (RSAC rating of web pages)

Note: There is a content setting in IE's Internet Options that can prevent browsing of some restricted websites, and the restriction level of the website is set through this parameter.

Usage: <META http-equiv="Pics-label" Contect="(PICS-1.1'http://www.rsac.org/ratingsv01.html'I gen comment 'RSACi North America Sever' by '[email protected]'for 'http://www.microsoft.com' on '1997.06.30T14:21-0500' r(n0 s0 v0 l0))">

Note: Do not set the level too high. RSAC's rating system provides a standard for evaluating Web site content. Users can configure Microsoft Internet Explorer (IE3.0 and above) to exclude sites containing pornographic and violent content. The HTML in the example above is taken from the Microsoft home page. The (n 0 s 0 v 0 l 0) in the code means that the site does not contain unhealthy content. The ratings are determined by RSAC, the rating agency of the American Entertainment Council. If you want to learn more about the RSAC rating system, or if you need to evaluate your own website, you can visit RSAC's website: http://www.rsac.org/.

8. Page-Enter, Page-Exit

Description: These are some special effects when the page is loaded and called out.

Usage: <Meta http-equiv="Page-Enter" Content="blendTrans(Duration=0.5)">

<Meta http-equiv="Page-Exit" Content="blendTrans(Duration=0.5)">

two,

The content of name specifies the actual content. For example, if level is specified as value, then Content may be beginner, intermediate, or advanced.

1. Keywords

Note: The keyword list provided for the search engine is from edu24ol.com. From edu24ol.com. From edu24ol.com.

Usage: <Meta name="Keywords" Content="Keyword 1, Keyword 2, Keyword 3, Keyword 4, ...">

Note: Each keyword is separated by a comma “,”. The common use of META is to specify keywords that search engines use to improve search quality. When several META elements provide document language dependencies, search engines use the lang attribute to filter and display search results by the user's language preference. For example:

<Meta name="Kyewords" Lang="EN" Content="vacation,greece,sunshine">

<Meta name="Kyewords" Lang="FR" Content="vacances,grè:ce,soleil">

2. Description

Description: Description is used to tell search engines the main content of your website.

Usage: <Meta name="Description" Content="Brief description of your webpage">

Notice:

3. Robots (Robot Guide) Reprinted from Global Online School edu24ol.com Reprinted from Global Online School edu24ol.com Reprinted from Global Online School edu24ol.com

Description: Robots is used to tell search robots which pages need to be indexed and which pages do not need to be indexed. The parameters of Content include all, none, index, noindex, follow, and nofollow. The default is all.

Usage: <Meta name="Robots" Content="All|None|Index|Noindex|Follow|Nofollow">

Note: Many search engines log in to websites by sending out robot/spider searches. These robots/spiders use some of the characteristics of the meta element to decide how to log in.

all: files will be retrieved and links on the page can be queried;

none: The file will not be indexed, and the links on the page cannot be queried; (same effect as "noindex, no follow")

index: The file will be retrieved; (let the robot/spider log in)

follow: The links on the page can be queried; Reposted from Global Online School edu24ol.com Reposted from Global Online School edu24ol.com Reposted from Global Online School edu24ol.com

noindex: The file will not be retrieved, but the links on the page can be queried; (Do not allow robot/spider to log in)

nofollow: The file will not be retrieved, but the links on the page can be queried. (Do not allow robots/spiders to follow the links on this page to search further)

4. Author

Description: Mark the author or production team of the web page

Usage: <Meta name="Author" Content="Zhang San, [email protected]">

Note: Content can be: your or your production team's name, or email

5. Copyright

Note: Copyright is transferred from Global Online School edu24ol.com Transferred from Global Online School edu24ol.com Transferred from Global Online School edu24ol.com

Usage: <Meta name="Copyright" Content="This page is copyrighted by Zerospace. All Rights Reserved">

Notice:

6. Generator

Description: Editor's description

Usage: <Meta name="Generator" Content="PCDATA|FrontPage|">

Note: Content="the editor you use"

7. revisit-after

illustrate:

Usage: <META name="revisit-after" CONTENT="7 days" >

Notice:

★Some other uses in Head

1. Scheme

Note: scheme can be used when name is used to specify how the value of content should be interpreted.

Usage: <meta scheme="ISBN" name="identifier" content="0-14-043205-1" />

Notice:

2. Link

Description: Link to file

Usage: <Link href="soim.ico" rel="Shortcut Icon">

Note: If you save many websites in your inbox, you will find a small icon with them. If you click on them again, you will also find a small icon in the address bar. Now you can easily achieve this function by just adding this paragraph to your page header. <LINK> is used to link the current file to other URLs, but there will be no link button. It is used between <HEAD> tags and has the following format:

<link href="URL" rel="relationship">

<link href="URL" rev="relationship">

3. Base (base link)

Note: Insert the base link property of the web page. Reprinted from Global Online School edu24ol.com Reprinted from Global Online School edu24ol.com Reprinted from Global Online School edu24ol.com

Usage: <Base href="http://www.xia8.net/" target="_blank">

Note: All relative paths on your web pages will be preceded by "http://www.cn8cn.com/" when linking. Where target="_blank" means the link file is opened in a new window. 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 basic uses of META tags, the most important of which are: setting Keywords and Description. Why? The reason is simple. These two statements can allow search engines to accurately find you and attract more people to visit your site! According to the working principles of popular search engines (Google, Lycos, AltaVista, etc.), search engines first send robots to automatically search on the WWW. When new websites are found, they are convenient for retrieving Keywords and Descriptions on the pages, and adding them to their own databases, and then sorting the websites according to the density of keywords.

From this, it can be seen that we must remember to add the META tags of Keywords and Description, and write the keywords and introduction as well as possible. otherwise,
The consequences will be:

● If your page does not have META tags for Keywords and Description, the robot will not be able to add your site to the database, and netizens will not be able to search for your site.

● If your keywords are not chosen well and the keyword density is not high, the possibility of being ranked behind dozens or even millions of sites and being clicked is very small.

When writing Keywords, you should pay attention to the following points:

● Don’t use common words. For example, www, homepage, net, web, etc.

● Don’t use adjectives or adverbs. For example, best, biggest, etc.

● Don't use general terms, be as precise as possible. For example, instead of "Ericsson mobile phone", it would be better to use "T28SC".

"When three people walk together, there must be one who can teach me something." The trick to finding suitable keywords is: go to famous search engines such as Google, Lycos, Alta, etc., search for websites with similar content to yours, check the META keywords of the top ten websites, and use them on your website. You can imagine the effect.

Tips

In order to improve the search click rate, here are some "shortcuts" that can help you:

● In order to increase the density of keywords, hide the keywords in the page (define the text color to be the same as the background color).

<<:  How to create a stylish web page design (graphic tutorial)

>>:  Detailed usage of MYSQL row_number() and over() functions

Recommend

Solve the problem when setting the date to 0000-00-00 00:00:00 in MySQL 8.0.13

I just started learning database operations. Toda...

vue3+ts+EsLint+Prettier standard code implementation

Table of contents use Use of EsLint Add a profile...

How to configure /var/log/messages in Ubuntu system log

1. Problem Description Today I need to check the ...

Detailed explanation of map overlay in openlayers6

1. Overlay Overview Overlay means covering, as th...

Mysql uses stored procedures to quickly add millions of data sample code

Preface In order to reflect the difference betwee...

Optimizing query speed of MySQL with tens of millions of data using indexes

1. The role of index Generally speaking, an index...

Solution to forget password when installing MySQL on Linux/Mac

Preface This article mainly introduces the releva...

Linux bridge method steps to bridge two VirtualBox virtual networks

This article originated from my complaints about ...

How to use webSocket to update real-time weather in Vue

Table of contents Preface About webSocket operati...

Detailed steps to expand LVM disk in Linux

1. Add a hard disk 2. Check the partition status:...

Detailed explanation of the steps to create a web server with node.js

Preface It is very simple to create a server in n...

Solution to the problem of MySQL deleting and inserting data very slowly

When a company developer executes an insert state...

Linux Domain Name Service DNS Configuration Method

What is DNS The full name of DNS is Domain Name S...