Forum Moderators: open
However, recently I have been writing landing pages, that start with an H1 in the top left followed by the pages content. Then, in the sidebar on the right I put the logo at the top, but I'm not sure what element to use. Or maybe I should use an image in this case, since it is not really the page heading but actually just an image?
What do you use / what is generally considered correct?
>Web Standards Project uses an H1 element.
>A List Apart uses an image tag.
I've just thought of one scenario where using an image is less convenient: if you want to apply an a:hover effect to the logo. If you use an image that could be a hassle.
I just checked W3c as well -- they use H1 and image. In the case of W3C though, the logo is the pages main heading I suppose.
I think on my landing pages an image is the most suitable choice. But where the logo is also the heading, like on W3C, a H1 might be better. In fact on the W3C site I don't see why they couldn't have filled the H1 tags with text and used CSS to display the logo, rather than an image, since they're affectively stating that it is a heading. But maybe I'm wrong.
<h1><a href="home.html" title="Home Page">Example.com - A detailed description of this page's content</a></h1>
Then add a class to either the body or the <h1> tag with CSS something like:
.home h1 {
width: 220px;
height: 100px;
text-indent: -5000px;
background: url(images/body/logo.jpg) no-repeat top left;
}
[edited by: tedster at 4:01 am (utc) on Dec. 12, 2007]
mattur -- I spose that really demonstrates the proper usage. The home page probably is the only page, on which the logo is also the main heading, and I suppose the 'heading' of the whole website. You wouldn’t really want the same heading on every page though, depending on how you view your pages/use your pages.
In terms of SEO, I would probably go for an H1 and text on the home page and and image on the other pages, giving way to a more specifically descriptive H1 in the content. That might be a little inconvenient though if you use includes, like in WordPress.