Detailed explanation of the use of the <meta> tag in HTML

Detailed explanation of the use of the <meta> tag in HTML

In the web pages we make, if we want more people to visit it, the best way is to use search engines to find your URL, so you need your web page to have keywords that search engines can identify, so the <meta> tag in HTML is this function, write the key information of this page into it, so that search engines can identify it, then let's talk about how to use <meta>:

<head>
<title>mate</title>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="author" content="Erwin Aligam - styleshout.com" />
<meta name="description" content="Site Description Here" />
<meta name="keywords" content="keywords, here" />
<meta name="robots" content="index, follow, noarchive" />
<meta name="googlebot" content="noarchive" />
</head>

1. Use of attributes

This is a simple example. This tag is written in <head> and will not be seen by users. It depends on your own needs whether you need these functions. The main attributes of the tag are http-equiv and name.

http-equiv is like the header file of http, which can send some useful information to the browser to help better display the content you want. The value of http-equiv attribute can be content-type, expires, refresh and so on.

name This attribute is mainly used to describe the web page. The value of the name attribute can be: author, description, keywords, generator, etc.

2. Application of name attribute

The use of name can be seen in the examples above, such as keywords and description, because according to the working principle of search engines, search engines will first exclude the keywords and descriptions in the page that are automatically retrieved by robots, and add them to their own database, and then sort the websites according to the density of keywords, so these two attributes are very important.

Note: The content of keywords should be limited to 36 characters.

The content of description should be limited to 76 characters.

These two need to be used together

Summarize

The above is a detailed explanation of the use of the <meta> tag in HTML. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

<<:  How to automatically deploy Linux system using PXE

>>:  Detailed explanation of CSS elastic box flex-grow, flex-shrink, flex-basis

Recommend

Vertical and horizontal splitting of MySQL tables

Vertical Split Vertical splitting refers to the s...

Install Apple Mac OS X in VMWare12 Graphic Tutorial

1. Introduction: Because my friend wanted to lear...

MySQL fuzzy query statement collection

SQL fuzzy query statement The general fuzzy state...

Parsing Linux source code epoll

Table of contents 1. Introduction 2. Simple epoll...

Some suggestions for improving Nginx performance

If your web application runs on only one machine,...

MySQL time types and modes details

Table of contents 1. MySQL time type 2. Check the...

【HTML element】Detailed explanation of tag text

1. Use basic text elements to mark up content Fir...

How to install MySQL via SSH on a CentOS VPS

Type yum install mysql-server Press Y to continue...

Detailed explanation of the four transaction isolation levels in MySQL

The test environment of this experiment: Windows ...

PHP scheduled backup MySQL and mysqldump syntax parameters detailed

First, let's introduce several common operati...

In-depth interpretation of /etc/fstab file in Linux system

Preface [root@localhost ~]# cat /etc/fstab # # /e...

Detailed explanation of how a SQL statement is executed in MySQL

Overview I have recently started learning MySQL r...