Jump to content

h1, h2 tags and SEO etc.


Wickham

Recommended Posts

This is an old chestnut - how to code h1 tags.

 

The general consensus from other forums is that the h1 tag should be for the page title, not the website title. See

http://www.w3.org/TR/html401/struct/global.html#edef-H1

A heading element briefly describes the topic of the SECTION it introduces.

 

The HTML specifications don't specifically say that the h1 cannot be used for the website title but the reference to section implies that it should be for the most important heading related to the page so that search engines can categorize each page instead of having the same h1 tag text on lots of pages.

 

I often have sites where I want to put the website title at the top of the screen before the h1 tag with the page title, but the general rule is that the h1 tag should be coded first for SEO purposes. If I code the website title in h2 tags and code it before the h1 tag, that's not good for SEO. I don't want to combine the website title and the page title in one h1 tag.

 

I have thought of coding the h1 page title tag first, then the h2 website title and repositioning the h2 website title with position: absolute or position: relative so that it jumps up over the h1 page title on the screen.

 

Is it acceptable and good for SEO to code the website title with a p tag first, possibly followed by some links also in p tags, followed by the h1 page title tag? The h1 tag is no longer the first tag, but it is the first heading tag.

Link to comment
Share on other sites

Is it acceptable and good for SEO to code the website title with a p tag first, possibly followed by some links also in p tags, followed by the h1 page title tag? The h1 tag is no longer the first tag, but it is the first heading tag.

 

You will be fine as far as Google is concerned. Some web standards zealots might have kittens ... but the important audiences (web browsers and Google) will not be bothered.

 

Stefan

Link to comment
Share on other sites

The majority believe the H1 should explain the page... but as you say it is not specified in the standards so others believe it should be the web site.

 

Then again there is no rule that says you cannot have 2 H1, so you can make both H1.

 

Of course what one codes and what one sees are different, you can code the H2 before the H1... but navigationaly it should appear after, in other words play games with the CSS.

 

Rule of thumb is to give the spyder or handicapped user what they want early on, like important details in then first paragraphs of a news paper article, then fill out below. Same here, the Nav and site info should be first and fluff coded in at the bottom. Then using CSS you can visually place things above the content, but search engines and blind users get the important stuff immediately.

 

Personally I never thought of the Web site title being worth an H1 at all. I would just put it in the usual tags. You can use it for the H1 of the entrance page where it is about the site... otherwise you want the engine to point folks to the info they want, not the site, so make the page description H1 for most all pages and use the web site title for the first page. Any page they get to the will know your site and/or be able to get to the home page.

Link to comment
Share on other sites

follow the same method as you would if you were to write a paper.

 

Like in regular writing you have the Title for the chapter then subtitles within that chapter, the <Hn> where 1<=n<=6 should be used accordingly.

One method of doing it is to imagine how your site would look like as a table of content you would have your chapter titles showing first and under it the subtitles would be shown:

 

<h1>Title</h1>

<h2>sub title</h2>

<h3>Subtilte within subtitle</h3>

... and so on.

 

 

My advice use them to help you organise and structure the text within your site.

Edited by krillz
Link to comment
Share on other sites

Thanks Stef, Kyle and Krillz.

 

The comparison with a newspaper is that I want, say, "London Evening Times" to appear at the top of every page, just so if someone arrives at that page without seeing the home page they will see what the website title is, but it's the same for every page which is not good SEO, so I'm coding it as large font in a p tag and then the h1 is for the main page heading, different on every page, which is what you all seem to agree on.

Link to comment
Share on other sites

Sounds good, there is nothing wrong with the banner on every page... it just need not be a header on all. I would use a <span> tag rather than a paragraph, it is not a paragraph and not part of the content. Throw it in a span and format it as you like... a Div might actually be a better choice so it is a block level element and easier to position.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...