মূল বিষয়বস্তুতে যান

H1 Tag Example: HTML Code and Examples for Every Page Type

LinkinTech SEO Editorial Team· Editorial Team· 17 min read
H1 Tag Example: HTML Code and Examples for Every Page Type

Quick Answer

A simple h1 tag example is <h1>How to Start a Vegetable Garden</h1>. The H1 identifies the main heading of a webpage. Place it inside the HTML body and write text that clearly describes the page. The same code works for blog posts, business homepages, product pages, and tutorials. Only the heading text needs to change.

Key Takeaways

  • Basic HTML: Write <h1>Your Main Heading</h1> to create an H1 heading.
  • Choose wording by page type: An article needs its topic, a product page needs its product name, and a service page needs its actual service.
  • Be specific: A heading such as 'Emergency Roof Repair in Denver' is more informative than 'Welcome to Our Website' when that is what the page offers.
  • Use clear structure: A main H1 usually works well with H2 headings for major sections and H3 headings for subsections.
  • Check actual HTML: Large, bold text is not necessarily an H1. The underlying element matters.
  • Avoid SEO myths: There is no guaranteed ranking improvement from a particular H1 length, keyword position, or heading count.

A Simple H1 Tag Example in HTML

The easiest way to understand an H1 is to see the actual code:

<h1>How to Start a Vegetable Garden</h1>

When a browser displays that code, visitors see the heading:

How to Start a Vegetable Garden

The code has three parts:

  1. <h1> opens the heading element.
  2. How to Start a Vegetable Garden is the heading text visitors read.
  3. </h1> closes the heading element.

The H1 is a semantic HTML element. That means it identifies the text as a heading, not merely as something that should appear large or bold.

The MDN reference for HTML heading elements explains that HTML provides six heading levels, from H1 through H6. An H1 represents the highest level.

For most ordinary webpages, one clear main H1 is a straightforward choice. The text should describe the actual content, not simply contain a keyword you hope to rank for.

A Complete HTML Page With an H1

Here is a complete example you can copy into an HTML file:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Beginner's Guide to Indoor Gardening</title>
</head>
<body>
  <main>
    <h1>Beginner's Guide to Indoor Gardening</h1>

    <p>Learn how to grow and care for plants indoors.</p>

    <h2>Choose the Right Plants</h2>
    <p>Start with plants suited to your home's light.</p>

    <h2>Set Up Your Growing Space</h2>

    <h3>Check the Natural Light</h3>
    <p>Observe how much sunlight the room receives.</p>

    <h3>Choose Suitable Containers</h3>
    <p>Select containers that meet your plants' needs.</p>
  </main>
</body>
</html>

Notice how the headings work together.

The H1 introduces the whole page. Each H2 introduces a major section. The H3 elements divide the growing-space section into smaller topics.

The <title> element is different. It belongs in the document's <head> and supplies the document title, often visible in the browser tab. The H1 appears within the webpage's body.

They can use the same wording, as they do here, but they do not have to match exactly.

The WHATWG HTML Living Standard defines HTML headings and their structural meaning. The W3C Web Accessibility Initiative also explains why meaningful heading relationships help people navigate a page.

Now that you have working code, the more important question is what to write inside it.

H1 Examples for Different Types of Webpages

An H1 element uses the same HTML syntax everywhere. What changes is the visitor's reason for opening the page.

Someone reading a tutorial expects a clear learning goal. A shopper expects to see the product. A local customer wants to know whether the business provides the needed service.

Here are eight examples you can adapt.

1. Blog Article H1 Example

Imagine you are publishing an article explaining how beginners can grow vegetables at home.

<article>
  <h1>How to Start a Vegetable Garden at Home</h1>
  <p>Learn how to choose a growing space and plan your first garden.</p>
</article>

This heading works because it identifies the activity and makes the article's purpose clear.

Compare it with:

<h1>Gardening Tips</h1>

'Gardening Tips' is not incorrect HTML. It is simply broader and less informative for an article specifically about starting a vegetable garden.

How to adapt it: Describe the actual question your article answers. If the article focuses on growing tomatoes in containers, say that rather than promising a general gardening guide.

2. Business Homepage H1 Example

Consider a plumbing company serving homeowners in Austin, Texas.

<main>
  <h1>Residential Plumbing Services in Austin</h1>
  <p>Explore repairs, installations, and maintenance services.</p>
</main>

A visitor immediately understands the business category and intended service area.

A homepage H1 does not always need a city name. A national business, online company, or recognizable brand may need different wording.

For example, an online bookkeeping provider might use:

<h1>Online Bookkeeping for Small Businesses</h1>

How to adapt it: State the business's main offering in terms a potential customer understands. Add a location only when the business genuinely serves that area.

Avoid inserting a city simply because it appears in a popular search query.

3. Product Page H1 Example

On an ecommerce product page, the H1 should normally identify the product the shopper is considering.

<main>
  <h1>Women's Waterproof Hiking Jacket</h1>
  <p>A lightweight jacket designed for wet-weather hikes.</p>
</main>

A more specific product might include its model name:

<h1>TrailPeak Women's Waterproof Hiking Jacket</h1>

TrailPeak is an illustrative product name, not a reference to a verified commercial product.

The main point is to identify the item accurately.

A heading such as 'Outdoor Adventures Start Here' might work as promotional copy, but it does not tell someone which jacket is being sold.

How to adapt it: Use the actual product name and meaningful identifying details. Avoid adding features that the item does not have.

4. Service Page H1 Example

A service page should tell customers what service they can learn about or request.

<main>
  <h1>Small Business Bookkeeping Services</h1>
  <p>Explore monthly bookkeeping and financial record services.</p>
</main>

This is appropriate for a page explaining bookkeeping services for small businesses.

If the actual page is about payroll management, it should use an H1 that identifies payroll management instead.

For example:

<h1>Payroll Management Services for Small Businesses</h1>

These are different service topics, even if one company offers both.

How to adapt it: Start with the specific service, then add a useful qualifier when it reflects the intended customer or offering.

5. Local Service Page H1 Example

Local service pages often need to explain both the service and the area covered.

<main>
  <h1>Emergency Roof Repair in Denver</h1>
  <p>Learn about available emergency roofing repairs.</p>
</main>

The location helps visitors understand whether the page is relevant to them.

But the wording creates an expectation. A company should not publish this heading unless it actually provides emergency roof repair in Denver.

If the company serves several nearby areas, the page content should explain its real coverage rather than simply listing cities in the H1.

How to adapt it: Use the service and the geographic area that the page genuinely represents. Make sure the supporting copy fulfills the promise.

6. Tutorial H1 Example

A tutorial heading should communicate what readers will learn to accomplish.

<article>
  <h1>How to Create a Monthly Budget in Excel</h1>
  <p>Follow the steps to build a simple monthly budget.</p>
</article>

The heading identifies the task and the software involved.

Compare that with:

<h1>Excel Tips and Tricks</h1>

The second heading may suit a general collection of Excel advice. It is less useful for a tutorial devoted to creating a monthly budget.

How to adapt it: Name the result readers should achieve and include the software, tool, or method when it genuinely matters.

7. Category Page H1 Example

A category page helps visitors explore a collection of related items.

<main>
  <h1>Organic Coffee Beans</h1>
  <p>Browse our selection of organic coffee beans.</p>
</main>

Unlike a product detail page, a category heading describes the collection rather than a single item.

Other valid examples include:

<h1>Men's Running Shoes</h1>
<h1>Beginner Photography Courses</h1>

How to adapt it: Identify the real product or content category. Keep the heading broad enough to cover the collection but specific enough to distinguish it from unrelated categories.

8. Contact Page H1 Example

A contact page does not need an elaborate, keyword-heavy heading.

<main>
  <h1>Contact Our Support Team</h1>
  <p>Send us a message about your account or order.</p>
</main>

A simple heading such as <h1>Contact Us</h1> is also perfectly reasonable.

The purpose of a contact page is straightforward. Adding extra keywords or unnecessary promises would not make the heading more useful.

How to adapt it: Choose a heading that matches the available contact options. If the page is specifically for technical support, make that purpose clear.

Which H1 Example Should You Use? A Practical Comparison

The following table is an original editing reference. It is not based on claimed ranking tests or measured SEO performance.

Page Type Less Useful H1 More Useful H1 Why the Change Helps
Blog article Gardening Tips How to Start a Vegetable Garden at Home Identifies the article's specific topic
Plumbing homepage Welcome to Our Website Residential Plumbing Services in Austin Explains the service and location
Product page Great Outdoor Gear Women's Waterproof Hiking Jacket Identifies the item being sold
Bookkeeping service Financial Solutions Small Business Bookkeeping Services Names the actual service
Local roofing page We Are Here to Help Emergency Roof Repair in Denver Shows the service and relevant area
Excel tutorial Helpful Excel Tips How to Create a Monthly Budget in Excel Makes the learning goal clear
Coffee category Shop Our Products Organic Coffee Beans Identifies the collection
Support page Get Connected Contact Our Support Team Explains the page's purpose

The right column is not automatically better for every website. It is better when that wording accurately matches the specific page.

For example, 'Gardening Tips' could be an appropriate H1 for a broad gardening advice category. It is less helpful for an individual article about starting a vegetable garden.

This distinction matters more than blindly following a formula.

A Three-Question Test Before Choosing Your H1

Look at your proposed heading and ask:

  1. What page is this? Can a visitor recognize its topic, product, service, or purpose without reading several paragraphs?
  2. Is the promise accurate? Does the page provide what the heading suggests?
  3. Could this heading fit dozens of unrelated pages? If so, is there a useful detail you should add?

Consider this example:

<h1>Professional Services</h1>

It is valid HTML, but on a page about bookkeeping it gives little information.

A clearer alternative is:

<h1>Monthly Bookkeeping Services for Small Businesses</h1>

However, if the business does not offer monthly bookkeeping, that more specific heading would be misleading.

Specificity is useful only when it remains truthful.

How to Add an H1 Tag to Your Webpage

If you edit HTML directly, adding an H1 is simple. If you use a website builder or content management system, first check whether it already generates the heading.

Step 1: Choose the Actual Main Heading

Find the text that best identifies the page.

For a tutorial, that might be:

<h1>How to Replace a Bicycle Tire</h1>

For a product category, it might be:

<h1>Mountain Bike Accessories</h1>

Do not select a heading solely because it contains a search phrase. Choose wording that matches the page's real subject.

Step 2: Place the Heading in the Body

The H1 belongs inside the HTML document body, usually within the main page content.

For example:

<body>
  <header>
    <nav aria-label="Main navigation">
      <a href="/">Home</a>
    </nav>
  </header>

  <main>
    <h1>How to Replace a Bicycle Tire</h1>
    <p>Learn the basic steps for replacing a tire.</p>
  </main>
</body>

This example places the main heading within the <main> element, which identifies the page's primary content.

The H1 does not need to be the first HTML element inside the body. Site navigation, headers, and other interface elements may appear before it.

Step 3: Use Supporting Headings for Sections

Suppose the bicycle tutorial includes tools, removal, installation, and safety checks.

You could organize it like this:

<h1>How to Replace a Bicycle Tire</h1>

<h2>Tools You Will Need</h2>

<h2>Remove the Old Tire</h2>
<h3>Release the Wheel</h3>
<h3>Remove the Tire</h3>

<h2>Install the New Tire</h2>
<h3>Seat the Tire Bead</h3>
<h3>Inflate and Inspect the Tire</h3>

The example uses one main H1, three H2 sections, and relevant H3 subsections.

Notice that the headings describe the actions in the tutorial. They are not chosen to reach a required keyword count.

The W3C guidance on page headings explains how this type of heading structure supports navigation and understanding.

Step 4: Check the Rendered HTML

A heading may look correct on screen without using the correct HTML element.

For example:

<div class="page-heading">How to Replace a Bicycle Tire</div>

CSS could make that text large and bold, but the element is still a generic <div>.

If it is the main heading, use:

<h1 class="page-heading">How to Replace a Bicycle Tire</h1>

You can keep the same CSS class and visual style while providing heading semantics.

To inspect an existing webpage in a desktop browser:

  1. Open the webpage.
  2. Right-click the main visible heading and choose Inspect.
  3. Look at the HTML element surrounding the heading text.
  4. Confirm whether it uses <h1>.
  5. Review nearby section headings to check that they form a sensible hierarchy.

If you use WordPress, Shopify, or another publishing platform, check the page's rendered output. A theme or template may already produce an H1 from the page or product title.

Do not add another H1 simply because you cannot see an H1 field in the editor.

Step 5: Check the Heading on Mobile

A heading can be semantically correct but visually awkward.

For example, a long title might wrap across several lines on a phone. That is not automatically an HTML or SEO error, but poor spacing can make the page difficult to scan.

Check that the heading remains readable, does not overlap other elements, and still clearly identifies the content.

Use CSS to control font size and spacing. Do not change an H1 into an H3 solely because you prefer the H3's default appearance.

Common H1 Example Mistakes to Avoid

Most useful H1 improvements are straightforward. The following mistakes are worth checking before publishing.

Mistake 1: Using a Vague Promotional Slogan

<h1>Experience Excellence</h1>

That slogan could belong to almost any company.

On a bookkeeping service page, a clearer heading might be:

<h1>Bookkeeping Services for Small Businesses</h1>

You can still use 'Experience Excellence' as supporting marketing copy if it fits the brand. It does not have to serve as the main page heading.

Mistake 2: Repeating Search Terms Unnaturally

<h1>Denver Roofing Denver Roof Repair Denver Roofers</h1>

This heading is difficult to read and repeats similar terms without helping visitors.

A more useful alternative is:

<h1>Roof Repair Services in Denver</h1>

The goal is not to remove every keyword. It is to make the heading informative and natural.

For broader help with choosing terms and building useful pages, see SEO Friendly Content Writing: A Practical Guide to Planning, Writing, and Optimizing Content.

Mistake 3: Using a Product Feature That Is Not True

Imagine a jacket is water-resistant but not waterproof.

This H1 could mislead customers:

<h1>Waterproof Lightweight Hiking Jacket</h1>

A more accurate heading would use the actual product specification:

<h1>Water-Resistant Lightweight Hiking Jacket</h1>

A heading should not promise features, availability, prices, locations, or results that the page cannot support.

Mistake 4: Choosing Heading Levels by Font Size

Do not use an H1 simply because you want large text.

Likewise, do not use an H4 as a main page heading just because the theme's H4 styling looks better.

Choose the HTML element for its meaning, then adjust its appearance with CSS.

The MDN heading-element reference provides additional technical guidance on heading levels and accessibility.

Mistake 5: Adding a Second H1 Without Checking the Template

Some content management systems automatically wrap the page title in an H1.

If you manually insert another H1 into the article body, you may create two competing main headings without intending to.

This does not automatically establish a Google penalty. It does suggest that you should review the page's actual structure and decide which heading communicates the primary subject most clearly.

What Makes an H1 SEO-Friendly?

An SEO-friendly H1 is first and foremost a useful heading for people.

It identifies the page's subject, uses understandable language, and agrees with what the visitor finds below it.

Google's documentation on search-result title links explains that Google may use several sources when creating a title link, including the HTML title element, the main visible title, headings, and other prominent text.

That makes clear, consistent page labeling a sensible practice. It does not mean a particular H1 automatically appears in Google's search results or guarantees a better ranking.

Should the H1 Contain the Main Keyword?

If the main search phrase naturally describes the page, including it in the H1 can make sense.

For example, an article explaining how to create a monthly budget in Excel can reasonably use:

<h1>How to Create a Monthly Budget in Excel</h1>

The heading communicates the reader's task and happens to contain terms the reader may search for.

There is no need to force several near-identical phrases into the same heading.

Does the H1 Need a Specific Length?

No universal Google H1 character limit was established by the official guidance reviewed for this article.

A heading should be long enough to identify the page clearly and short enough to remain easy to understand.

For example, 'Contact Us' can work perfectly well for a contact page. A specialized tutorial may need more words to name its subject accurately.

Do not automatically apply a title-tag length recommendation to an H1. They are separate HTML elements.

Should Every Page Have Exactly One H1?

For a conventional article, homepage, product page, or service page, using one clearly identifiable main H1 is usually the simplest approach.

MDN recommends generally using a single H1 that describes the page's content.

However, multiple H1 elements are not automatically invalid HTML, and the presence of more than one does not by itself establish a Google ranking penalty.

Focus on whether the structure makes sense for readers and assistive technologies. When in doubt, one primary H1 followed by appropriately organized H2 and H3 headings is a practical default.

For readers who want to understand H1 optimization as part of a larger SEO workflow, the site's SEO 101 beginner guide provides broader context about content, technical SEO, crawling, and indexing.

A Quick H1 Checklist Before Publishing

Use this short checklist after adapting an example to your own page.

Check What to Confirm
Correct HTML The main heading uses an actual <h1> element
Clear page subject The text identifies the article, product, category, or service
Accurate promise The content genuinely delivers what the heading suggests
Appropriate specificity Important details help readers without introducing false claims
Natural language The heading reads smoothly without repeated keywords
Clear hierarchy Major supporting sections use meaningful H2 headings
Template awareness The publishing system has not unintentionally added a competing H1
Mobile readability The heading remains understandable on smaller screens
Document consistency The H1 and HTML title describe the same underlying page subject

A heading does not need to be complicated to pass these checks.

If your page is about a single hiking jacket, a truthful product name may be all you need. If it teaches a detailed process, a 'How to' heading may provide more useful direction.

Frequently Asked Questions

What Is the Simplest H1 Tag Example?

The simplest example is:

<h1>My Page Heading</h1>

Replace 'My Page Heading' with text that describes the actual page. The opening and closing tags tell the browser that the text is an H1 heading.

Where Should I Put an H1 Tag?

Place the H1 inside the HTML document's <body>, generally within the main content area. It does not belong inside the document's <head>.

On a typical webpage, the main H1 appears near the beginning of the primary content, although navigation and other interface elements may come before it.

Can I Have Two H1 Tags on One Page?

Yes. Multiple H1 elements do not automatically make an HTML document invalid or trigger a confirmed Google ranking penalty.

For most conventional webpages, one clear main H1 is a simpler editorial and accessibility choice. Review the structure instead of treating the number alone as a pass-or-fail SEO test.

What Is the Difference Between H1 and H2?

An H1 identifies a top-level heading, while an H2 introduces a supporting section beneath that main topic.

For example, a page titled 'Beginner's Guide to Indoor Gardening' could use 'Choose the Right Plants' and 'Set Up Your Growing Space' as H2 headings.

Use the levels to communicate relationships, not to control font sizes.

Should My H1 Match My SEO Title?

They should describe the same page, but they do not have to use identical wording.

The HTML title belongs in the document head, while the H1 is a heading within the body. Google may consider both, along with other sources, when creating search-result title links.

Can I Use an H1 on a Product Page?

Yes. A product detail page is a natural place for a main heading that identifies the item being sold.

For example:

<h1>Women's Waterproof Hiking Jacket</h1>

Use the actual product name and correct specifications rather than adding unsupported selling points.

How Do I Know Whether My Website Already Has an H1?

Open the page in your browser, right-click the visible main heading, and select Inspect. Check whether the rendered HTML uses an <h1> element.

This is especially useful with content management systems because a theme may generate the H1 automatically.

Does an H1 Improve Google Rankings?

A descriptive H1 helps communicate the page's subject, and Google may use headings as one source for search-result title links. However, official documentation does not establish a guaranteed ranking increase from adding an H1 keyword or using a particular number of headings.

Use headings to make pages clearer, then evaluate SEO performance in the context of content quality, relevance, and other factors.

Final Thoughts

The best H1 tag example is one you can adapt to the page you're actually creating.

For an article, name the subject or task. For a product page, identify the product. For a service page, tell customers what service is offered. For a tutorial, make the intended outcome clear.

Start with correct HTML, choose accurate wording, and check the finished page rather than relying only on how the text looks in an editor.

A good H1 is not a trick for search engines. It is a clear introduction to the content that follows. When that heading matches the reader's purpose, the whole page becomes easier to understand and navigate.