Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Multiple H1 H2 Tags

Featured Replies

Just need a little help really, I have seen a few websites which have multiple H1 & H2 tags with no images but different colours, how is this done?

Thanks

Edited by Sam G
moved from General Chat

Do you mean:

 

<!-- HTML -->

<h1>My Title</h1>

<h2 class="red">Second Title</h2>

<h2 class="green">Third Title</h2>

<!-- END HTML -->

/* CSS */
.red
{
color:#ff0000;
}

.green
{
color:#339900;
}
/* END CSS */

 

I am not sure if that is what you mean - can you point us at a site that does this?

It can also be done like this

 

<div id="header"><h2>colour blue</h2></div>
<div id="content"><h2>colour red</h2></div>

#header h2 {
color: blue;
}

#content h2 {
color: red;

 

Also I'm no expert but I think they say, you shouldn't use <h1> tags more than once on a page. Just as I am typing this, I found this

 

<h1> tag is intended to denote the highest level heading on a given web page.

 

It explains what the web page is about, and since a good web page ought to have one purpose, <h1> tag should therefore be used only once on each web page to avoid confusion.

 

This guideline is not in the HTML specification, but has been adopted by all good web developers I have met and worked with so far.

 

It is also a guideline accepted by SEO experts since Google and other search engines treat the <h1> tag with high level of importance.

 

Use <h1> tag on any given page only once and make sure it uniquely entitles what the page is about.

 

For the full article, http://www.flexewebs.com/semantix/semantic-uses-of-h1-h2-h6-html-tags/

  • Author

Thanks for the replies, I have now seen alot of sites doing it the way j05hr mentions, this is a great read My link

 

I never knew h1 tag should be used only once per page but notice thousands of sites using more than 5 h1 tags on one page so going to look into this more.

 

Thanks Again

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.