can i use an H1 like this?
obviously the h1 tag is for your main header. if my main header is an image should i surround it in an h1 tag... now this appears to work but is it good practice?
the only reason i thought of this is how people say to keep a header image inside an img tag instead of as a background in CSS file because it is content.
DaveyBoy posted this at 10:16 — 30th May 2006.
They have: 453 posts
Joined: Feb 2003
Isn't the whole point of the header tag so that the search engine can read the words that are placed between them? So if it's an imagine i don't think you're really benefitting from it.
Megan posted this at 12:49 — 30th May 2006.
She has: 11,421 posts
Joined: Jun 1999
Some people use an image replacement technique where the content within the tags is text but the CSS is set to display: none and add an image background.... it's something like that anyway. Do a search for "CSS image replacement"
Megan
Connect with us on Facebook!
steve40 posted this at 19:01 — 30th May 2006.
He has: 490 posts
Joined: May 2005
You can use an image, I don't. The only way is to fill out the "alt" tag with your web-site name. Most search engines will read this, including Google.
But it is best not to use an image, unless it is just a background.
PS# Google reads the alt tag, as an alt text not a page header. It is best to make your header, a header not an image.
If you want an image in the header use a smaller logo to the right, or left of the header text.
Busy posted this at 20:42 — 30th May 2006.
He has: 6,151 posts
Joined: May 2001
here is a thread about using the tag with a CSS image viewable (with code) http://www.webmaster-forums.net/showthread.php?t=33417
timjpriebe posted this at 17:55 — 31st May 2006.
He has: 2,667 posts
Joined: Dec 2004
I do this all the time. For an example, check out this site:
http://www.churchesofchristonline.com/
Here is the pertinent HTML:
<div id="pageHeader">
<h1><span>Churches of Christ Online.com </span></h1>
<h2><span>Getting Church of Christ Organizations onto the Web </span></h2>
</div>
And the corresponding CSS:
#pageHeader
{
background: url(images/header.jpg) no-repeat top left;
background-color: #666699;
width: 100%;
height: 100px;
float: left;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
}
#pageHeader span
{
display: none;
}
Tim
http://www.tandswebdesign.com
steve40 posted this at 18:38 — 31st May 2006.
He has: 490 posts
Joined: May 2005
Here is the way WDG says to handle a img header, Just like I said.
The Webmistress posted this at 09:35 — 1st June 2006.
She has: 5,586 posts
Joined: Feb 2001
Why would you want to? H1 is for text, the main heading of your page - images should be for your logo etc.
DaveyBoy posted this at 11:48 — 1st June 2006.
They have: 453 posts
Joined: Feb 2003
I'm assuming that they wanted to have an anti-aliased look to the text but have it inside the heading tags too.
timjpriebe posted this at 12:37 — 1st June 2006.
He has: 2,667 posts
Joined: Dec 2004
Daveyboy's hit the nail on the head. Plus, if they have style sheets turned off for some reason, the page title is still right where I had the image for the page title.
My understanding is that this is a very common thing for CSS layouts.
Tim
http://www.tandswebdesign.com
Abhishek Reddy posted this at 14:29 — 2nd June 2006.
He has: 3,348 posts
Joined: Jul 2001
Edit: nevermind. See Megan's post in the thread Busy linked.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.