The use of H1 - paper mag theme

User 92681 Photo


Registered User
12 posts

Hi!
I am finally validating my pages and am confused about the correct use of the h1 tag. I knew before using the validation that I had misused the tag - I had several h1 on my index page for instance (still there. I haven't uploaded the reworked files yet http://www.shake-and-shine.com). So I changed my heading css and only used one h1 per page, but I still got a validation error. Looking into the coffeecup themes, I saw that the header of a page usually has the h1 tag. I've worked my pages originally from your Paper Mag Theme (not that you can still see it) and Paper Mag has this header:

<header>
<div id="logoTxt">
<h1><span></span></h1>
<h2><span></span></h2>
</div>
<h1><span>Short Description or Tagline.</span></h1>
</header>

I didn't see a function to the empty h1 and h2 tags and removed them for my site. Just to test it out, I added <h1></h1> tags in my header and run validation again. This time, I didn't get an h1 warning but it complained about empty h1 tags.
(The validator is also complaining about missing section headings, but again the Paper Mag theme does not have them either).

I am running the validation because I am doing some basic SEO to my site. So, I wouldn't think that empty h1 tags would be helpful for search engines to find my site.
What is your recommendation? Please safe the honor of your theme!

Thanks, Monika
User 271657 Photo


Administrator
3,816 posts

You could wrap your logo in the <h1> tags:
<h1><img id="logoTxt" src="images/logowide.png" alt="Shake and Shine, Canine Wash and Deli" ></h1>

Wash your dog at Shake & Shine!

Maybe this should be your <h2> (rather than an <h3>)?
Then use <h3> for your other headings (Canine Wash, Deli, etc.).
I love deadlines. I like the whooshing sound they make as they fly by. (Douglas Adams)
https://www.callendales.com
User 122279 Photo


Senior Advisor
12,541 posts
Online Now

In html5 you CAN use multiple h1 tags on one and the same page if each of them is the heading of an article, wrapped in the article tags. See http://webdesign.tutsplus.com/articles/ … sign-16824
Ha en riktig god dag!
Inger, Norway
My new honey site, built with RFF: http://www.eikweb.com/horgenhonning/
Component sharing for RFF, RBB, RSD and SD: http://www.eikweb.com/sharing/


User 92681 Photo


Registered User
12 posts

Paintbrush - I tried your suggestion but the validator doesn't like a div wrapped into a h1.

Inger - Thanks I will check that out.
User 2147646 Photo


Registered User
230 posts
Online Now

Monika Lange wrote:
Paintbrush - I tried your suggestion but the validator doesn't like a div wrapped into a h1.

Paintbrush never suggested wrapping a div with h1 tags. What he suggested was to wrap your logo img in h1 tags :)

User 92681 Photo


Registered User
12 posts

James, thanks!

A lot of the structure of my site comes from adapting the hell out of an existing theme, and I finally took out the div logo construct and turned it into an img. So now i could try it!


Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.