How many times can the h1 tag appear in an HTML? What is the difference between h1 tag and title tag?

寻∝梦
Release: 2018-08-29 10:57:28
Original
6892 people have browsed it

This article mainly introduces some explanations about HTML h1 tags. There are differences between html h1 tags and html title tags. There are also differences between h1 tags and title tags in web pages and SEO optimization. There is also a small problem that h1 Tags can appear several times on a web page.

First let’s take a look at how many times the h1 tag in HTML can appear on a page:

The h1 tag is very important. The h1 tag is the same as the keyword tag. , which emphasizes a certain word on the web page.

When using h1 tags, please note that: a web page can only use one h1 tag, use h1 tags for your main keywords on the homepage, and use h1 tags for the article titles on the content page. Once the h1 tag is abused, such as appearing several times on a page, this will cause Baidu not to include your website. To summarize four points about HTML h1 tags:

  • H1 should not be used in LOGO.

  • There can be at most one H1 on a page, do not use multiple.

  • H1 is used where the main content of the page is the only one. For example: an article list page, article or product content page.

  • H1 is not equal to title. Title can contain H1. The H1 tag is entirely for users to see, but search engines also attach great importance to H1. Title is for users and search engines to see.

Now let’s talk about the difference between the h1 tag and the title tag:

The defined title is the title of the entire web page. It is only displayed in the tab bar at the top of the browser and not displayed on the web page. It is written for search engines to see. The <h1> tag is the title of an article or a certain paragraph of text in a web page. It is part of the content of the web page. It will be displayed on the web page and is written for users to see. </h1> <p><strong>To put it simply: </strong></p> <p>title appears in the </p> tag pair. Give the page a name. <p>h1 is in < ;body> appears in the tag pair to define a title for text and the like </p> <p><strong>The difference between the placement of HTML h1 tags: </strong></p> <p></p> <title> tags are placed in < ;head> tag inside <p></p> <h1>...<h6> tag placed inside the tag</h6> </h1> <p><strong>The difference between h1 tag and title tag and seo: </strong></p> <p></p> <title> The SEO weight of tag points is very large, so generally the main keywords are placed in the <title> tag to optimize <p></p> <h1> tag points The SEO weight is second to the <title> tag. This tag is generally used for long-tail keywords, such as article titles. <p></p> <h2>...<h6>The SEO weight of tags is smaller in sequence. </h6> </h2> <p><strong>The difference in HTML h1 tag syntax format: </strong></p> <p></p> <title>I am the page title_PHP notes<title>

< ;hx>I am the title of the article (x represents: 1, 2, 3, 4, 5, 6) General headlines are expressed with h1.

Look here is an example of HTML h1 tag:

<!doctype html>
<html>
 <head>
 <meta charset="UTF-8">
 <title>我是网页标题(我是PHP中文网)</title>
 </head>
 <body >
 <h1>我是1号标题(PHP中文网)<h1/>
 <h2>我是2号标题(PHP中文网)<h2/>
 <h3>我是3号标题(PHP中文网)<h3/>
 <h4>我是4号标题(PHP中文网)<h4/>
 <h5>我是5号标题(PHP中文网)<h5/>
 <h6>我是6号标题(PHP中文网)<h6/>
 </body>
</html>
Copy after login

The above effect example is as shown below:

How many times can the h1 tag appear in an HTML? What is the difference between h1 tag and title tag?

One is smaller than the other, and the title at the end is smaller than normal text.

Okay, the above is the entire content of this article. If you have any questions, you can ask below

[Editor’s recommendation]

How to add html to Wrap text in pre tag? Usage examples of html pre tag

What does the HTML ul tag mean? Detailed explanation of the role of HTML ul tag

The above is the detailed content of How many times can the h1 tag appear in an HTML? What is the difference between h1 tag and title tag?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template