1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Is it ok to use H2 tags without H1

Discussion in 'HTML & Website Design' started by pipes, Jun 10, 2008.

  1. #1
    Is there any reason that i would/should be using a h1 tag if im using a h2 tag, im using h2 for titles on a post.
     
    pipes, Jun 10, 2008 IP
  2. risoknop

    risoknop Peon

    Messages:
    914
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #2
    H1 Tag is very similar to title tag. It should describe what is the page about. It is a good habit to structure your pages semantically - that means all your pages should have their own h1 tags. Though sometimes it isn't possible so easily - i.e. WP blog homepages sometimes don't have h1 tags.
     
    risoknop, Jun 10, 2008 IP
  3. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #3
    With my wordpress themes, that were mostly built with the help of a tutorial, the tutorial included a h1 tag for the header, but because i didn't follow the tutorial in everyway i didn't include h1 tags, and so i just use the h2 tags for post titles, although maybe not the perfect way to do it, do you think this is reasonably ok?

    I guess for future work though i should include h1 tags, to get into the habit of doing it properly.
     
    pipes, Jun 10, 2008 IP
  4. risoknop

    risoknop Peon

    Messages:
    914
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Well if the h1 tag would be in the header it would probably be the same for all pages. And that is incorrect. Every page should have its own unique h1 tag.

    The way I do it with my Wordpress themes:

    On the homepage, I usually have something very similar to blog's meta description (I try to keep it short). I use h2 tags for post titles.

    On a single pages or posts I use h1 as post titles.

    There are few very useful WP functions (like is_single() or is_page() etc) you can use to change the h1 tags according to whether it's a single page/post or a homepage, archive etc...
     
    risoknop, Jun 10, 2008 IP
  5. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I do the opposite and leave the H1 tag for the site title, and put it around the post titles instead, after all the post title is the title of the page, and my header is practically non-existant anyhow.
     
    wd_2k6, Jun 10, 2008 IP
    pipes likes this.
  6. risoknop

    risoknop Peon

    Messages:
    914
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Ok. Here's what I do.

    You can use something like this in your header:

    Or possibly:

    This way you will have some general h1 tag at homepage, archives and category pages... and there will be no h1 tag in the header in single posts and pages.

    Now you just need to close single post/page title between h1 opening and closing tags and that's it.

    I do that most of the time.
     
    risoknop, Jun 10, 2008 IP
    pipes likes this.
  7. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #7
    risoknop and wd_2k6 thanks to both of you, risoknop thanks very much for the code, it will be helpful for me when putting together my next theme.
     
    pipes, Jun 10, 2008 IP