Home Web Front-end HTML Tutorial meta name='' content='How to use

meta name='' content='How to use

Feb 10, 2018 am 10:18 AM
content name quot

This time I will bring you how to use meta name="" content=", what are the precautions for using meta name="" content=", what are the precautions, the following is a practical case, let's take a look one time.

1. Grammar:

<meta name="name" content="string"/>
Copy after login

2. Parameter analysis:
a. Name item: Commonly used options include keywords (keywords), description (website content description), author (author), robots (robot guide), etc.
b, http-equiv item: can be used to replace the name item. Commonly used options include Expires (period), Pragma (cache mode), Refresh (refresh), Set-Cookie (cookie setting) , Window-target (setting of display window), content-Type (setting of display character set ), etc.
c, content item: Determine what kind of string to fill in this item based on the definition of the name item or http-equiv 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 like this:

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
Copy after login

b. Let some search engines search for your web page. The code can be written like this:

<meta name="keywords" content="网页关键字" /> 
<meta name="description" content="网页描述文字" />
Copy after login

To achieve the real convenience of automatic search engines In order to search for your webpage, you must pay attention to the following points:

1. It is necessary to define not only the meta tag item, but also the first 200 characters of the homepage text to reflect the theme of the homepage. Because some

Navigation
platforms not only index the keywords in the meta item, but also index the first 200 characters in the text. Such as: altavista. Therefore, when some people check the registration results after registering the navigation platform, they find that the description in the navigation platform is not what you expected, but text such as a copyright statement. The reason for this phenomenon is that this was not noticed. 2. Place 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="...,....,..."/>
Copy after login

3. Put the most important keywords at the front and let related keywords be adjacent. All lowercase and first letter capitalization coexist, because some navigation stations are sensitive to the case of characters when indexing. Do not exceed 250 words including punctuation marks

4. It is best not to use a frame structure on the homepage, because after the frame divides the screen into multiple windows, the navigation station cannot intelligently select the homepage in the correct window for indexing.

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/" />
Copy after login

The 6 in the content represents the time, the unit is seconds, url=behind Is 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; url=page1.htm" />
Copy after login

d. Let the web page be refreshed every once in a while. If you want 10 Refresh once every second. The code is written like this:

<meta http-equiv="refresh" content="10">
Copy after login

e. Through Meta, you can produce 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)" /> 其中,n的取值范围为0-23,具体的意义如下:
Copy after login

3 Circle Expand 4 from bottom to top


I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to other related articles on the php Chinese website!

Related reading:

How to use anchor points in html web pages


What are the ways to hide HtmL elements?

The above is the detailed content of meta name='' content='How to use. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 Jun 13, 2016 am 10:23 AM

php提交表单通过后,弹出的对话框怎样在当前页弹出php提交表单通过后,弹出的对话框怎样在当前页弹出而不是在空白页弹出?想实现这样的效果:而不是空白页弹出:------解决方案--------------------如果你的验证用PHP在后端,那么就用Ajax;仅供参考:HTML code

What should I do if php cannot get the name? What should I do if php cannot get the name? Nov 24, 2022 am 09:56 AM

PHP cannot get the name because when the name and id values ​​of the form element are different, the browser cannot recognize it. The solution: 1. Check whether some form elements and frame elements use name; 2. Check only Elements that can be assigned ID but not name; 3. For multi-select box checkbox, you can use "join(',', $__POST['name'])" to form data.

How to add name to setup in Vue3 How to add name to setup in Vue3 May 13, 2023 am 09:40 AM

What is the use of name in Vue3? 1. Name needs to be defined when making recursive components. 2. The component can be cached with keep-aliveincludeexclude. 3. When Vue reports an error or is debugging, you can see the name of the component. Vue3 defines name1. It is automatically generated as long as the setup syntax sugar mode single file component is turned on in the script. The corresponding name option will be automatically generated based on the file name. For example, Tree.vue, then its name will be automatically generated by Tree. This has a drawback. If you want to modify the name, you need to modify the component name. If there is a place to import the component, you need to modify it together. 2. Open a script to define name

CSS content properties explained: content, counter, and quotes CSS content properties explained: content, counter, and quotes Oct 21, 2023 am 10:16 AM

Detailed explanation of CSS content attributes: content, counter and quotesCSS (cascading style sheets) is an integral part of front-end development. It can help us beautify web pages and enhance user experience. In CSS, there are some special properties that can be used to control the display of text content, including content, counter, and quotes. This article explains these properties in detail and provides specific code examples. 1. content attribute content attribute

不用数据库来实现用户的简单的下载,代码如下,但是却不能下载,请高手找下原因,文件路劲什么的没有关问题 不用数据库来实现用户的简单的下载,代码如下,但是却不能下载,请高手找下原因,文件路劲什么的没有关问题 Jun 13, 2016 am 10:15 AM

不用数据库来实现用户的简单的下载,代码如下,但是却不能下载,请高手找下原因,文件路劲什么的没问题。

图片消失怎么解决 图片消失怎么解决 Apr 07, 2024 pm 03:02 PM

图片消失如何解决先是图片文件上传$file=$_FILES['userfile'];  if(is_uploaded_file($file['tmp_name'])){$query=mysql_query("INSERT INTO gdb_banner(image_src ) VALUES ('images/{$file['name'

图片消失怎么解决 图片消失怎么解决 Jun 13, 2016 am 10:09 AM

图片消失如何解决先是图片文件上传$file=$_FILES['userfile'];  if(is_uploaded_file($file['tmp_name'])){$query=mysql_query("INSERT INTO gdb_banner(image_src ) VALUES ('images/{$file['name'

为什么小弟我在php上写的这个代码,在浏览器上什么都不显示 为什么小弟我在php上写的这个代码,在浏览器上什么都不显示 Jun 13, 2016 am 10:24 AM

为什么我在php上写的这个代码,在浏览器上什么都不显示啊

See all articles