Home > Web Front-end > HTML Tutorial > What is html h1 tag? Detailed introduction to how to use html h1 tag

What is html h1 tag? Detailed introduction to how to use html h1 tag

寻∝梦
Release: 2018-08-29 13:39:02
Original
6523 people have browsed it

This article mainly introduces the use of HTML h1~h6, and introduces two methods of using HTML h1 tags in web pages. One is a detailed introduction to the homepage of the website, and the other is a detailed introduction to the article content page. Introduction, summary of the last point, now let’s take a look at this article

First of all, let’s take a look at what is the html h1 tag:

HTML h1 What is the label? It's a first-level title.

In a web page, the content included in h1 is the most important content besides the title, and it plays an important role in outlining the web page. The first thing search engines want to crawl is the content in the h1 tag. Therefore, it is stipulated that the h1 tag can only appear once in a page, otherwise the h1 tag will lose its meaning, and for search engines, this is a typical SEO excessive and will be punished sooner or later. For Google, web pages that excessively use h1 will not be included at all. If you find that your website homepage has not been paid attention to by Google, then you should be careful. Baidu may temporarily include you, but sooner or later you may be demoted or your site will be demoted. The following is an introduction to the use of h1 to h6.

  • h1 : Website title

  • h2 : Website subtitle

  • h3 : Website category directory

  • h4: Article classification of the website

  • h5: Article annotation

  • ##h6: tag tag

Now let’s take a look at the specific usage

  • First, website homepage, list page, category page , h1 should be assigned to the website name or used in a logo with an alt tag to emphasize the website name. The h2 tag is used to define the "site subtitle". If there is no subtitle, it is best to leave the h2 tag empty in case it is needed. The H3 tag is used to define the navigation column name, and the H4 tag is used to define the article list title. However, in most content systems, the article list output uses UL tags, so H4 may not be useful. This is just the analogy.

  • Second, in the article content page, h1 must be used in the title of the article, because for search engines, content is the goal they pursue, so we must direct search engines Get our article title. The other h tags can be deduced in sequence.

##Now let’s talk about the specific usage of the homepage of the website:

Because there will be many article lists on the homepage, if you put < The ;h1> tag is used to define the "article title", so it is inappropriate. It will cause the

tag to be repeatedly defined, destroying the uniqueness of the

tag. Therefore, on the homepage, the

tag is used to define the "site name". The

tag is used to define the "site subtitle". If there is no subtitle, the

tag is best left empty, just in case it is needed. The

tag is used to define the column name, and the

tag is used to define the article title. However, in most content systems, the
    tag is used for article list output, so the

    may not be useful. This is just the analogy here.

    Now let’s talk about the specific usage of the article content page in detail:

    There is a difference between the article content page and the homepage. For search engines, it is the article content that is valued. , and the article title is undoubtedly the most important weight to attract search engines. At this time, it would not be a waste if the only

    tag was given to the "website name". Since the site can use different templates, we can't be lazy at this time. We should readjust the Header area of ​​the article content page and give up the

    tag to the "article title".

    The definition of website name and website subtitle is replaced by

    and defined as id=Title and id=SubTitle respectively. Give the most valuable

    tags and

    tags to the main article and subtitles. To help improve the weight of the article in search engines.

    If there is no article subtitle, it is best to leave it empty just like the

    tag on the homepage, just in case you need it. It is recommended here that the

    and

    tags are the same, and it is best to ensure the uniqueness on the page.

    Now let’s summarize:

    I think h1 should be defined in different ways on different pages, such as:

      Home page, h1 must be used To define the "site name";
    • article page, because the article title is good for SEO, h1 is suitable for the article title;
    • column page , h1 gives the column name;
    • search page, h1 gives the search keyword;
    • tag page, h1 defines tags.
    • 【Editor’s Recommendation】

    How to use HTML iframe tag? Introduction to the use examples of HTML iframe tags


    How to wrap the text in the pre tag in html? Usage examples of html pre tag

    The above is the detailed content of What is html h1 tag? Detailed introduction to how to use html h1 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