tags:

views:

130

answers:

6

Which method is best?

<div id="header">
 <a id="logo" href="#"><img width="172" height="80" src="logo.jpg" alt="Clevex logo"></a>
    <h1>slogan of company</h1>
</div>

<div id="header">
 <a id="logo" href="#"><img width="172" height="80" src="logo.jpg" alt="Clevex logo"></a>
    <p>slogan of company</p>
</div>

<div id="header">
 <a id="logo" href="#"><img width="172" height="80" src="logo.jpg" alt="Clevex logo"></a>
    <span>slogan of company</span>
</div>

<div id="header">
   <div id="logo">
     <a href="#"><img width="172" height="80" src="logo.jpg" alt="Clevex logo"></a>
        slogan of company
   </div>
</div>
A: 

The slogan is probably subject to some design rules (e.g. the position relative to the logo). As the slogan probably makes little sense in a content / SEO way anyway, and it's more important it looks right, I would recommend putting the slogan into the image.

Pekka
but what if slogan has keywords related to business?
metal-gear-solid
Then put the keywords in elsewhere. The slogan is part of the logo. You don't want it messed up by people using their browsers' text zoom feature. Plus, if you put it into the image, it will always be nicely anti-aliased.
Pekka
A: 

Looks good, apart from the fact that a slogan isn't really a heading, hence a <span> or something without semantic meaning should be used instead of <h1>

Per Holmäng
+1  A: 

I would think a better approach would be to have the slogan as a span. The slogan is not truly the first header of your document. Think if it were a table of contents would you see the slogan as the first entry?

JadziaMD
A: 

In general, I think you'll see everyone's slogan as an image rather than text (with the text as the alt attribute). And href="#" means "go to the top of this page." It should probably be a link to the home page instead. ...As long as you use alt, search engines will index it properly. If this is the home page, that might justify having the name and slogan in h1 and h2 elements, but elsewhere it's probably not necessary. It's probably better to drive traffic based on the actual content of the page and not try to make every page the same in the eyes of search engine spiders. The company name is probably already in the url, which is plenty.

Eric Mickelsen
A: 

I guess not; It's better to do it like this:

<h1 onclick="document.location='/';"><span>CompanyName</span></h1>
<h2>Slogan here</h2>

Since your logo is part of the layout and not a image in context (for example a product picture) you should put it in the h1 background.

Do your CSS like this:

h1 {
 background-image: url(logo.png);
 width: 200px;
 height: 80px;
 cursor: pointer;
}

h1 span {
  display: none;
}

This way it is both readable for the and user and a search engine.

D4V360
but if i will waste H1 and H2 for logo then what will i use for inner pages headings? and why onclick="document.location='/';"? will it work without javascript?
metal-gear-solid
You can use something else for the slogan as well, but you still have your h3/h4/h5/h6/h7 - should be more than enough. The onclick won't work without javascript, if you wan't to do it without javascript you should put a <a> tag around it.
D4V360
You don't need the `span` element really, see my `text-indent` trick. And the `a` element should be inside the heading, since `h#` is a block element whereas `a` is an inline element.
JoostK
A: 

No, something like the following would be better:

<div id="header">
    <h1><a href="#" title="Company">Company</a></h1>
    <h2>Slogan</h2>
</div>

h1 { text-indent: -90000px; background: transparent url(/img/logo.png) no-repeat left top;  width: 172px; height: 80px; }
h1 a { display: block; width: 172px; height: 80px; }

The h1 is only used once, for the company itself. Then you replace that logo text with an image using CSS. This way you keep the markup within your CSS.

JoostK
but then for inner pages heading should i use <h2>, not <h1>
metal-gear-solid
That's right, and I even use h3 for the normal headings (You have six of them, do use them as appropriate!) You really should disable CSS to see whether you're structure has been built well and whether or not you have used the right headings.
JoostK
and is it not better to use logo as a <img> and put company name as a ALT and in Title for <a>?
metal-gear-solid
@Joostk - but search gives more important to H1 than H2 and so on, and for whole site only company name will be the most important element for search engine.
metal-gear-solid
see this also http://www.h1debate.com/
metal-gear-solid
Well, your company is the most important, right? It is what the whole site is about, so every page on your site is about the company. And why would you use an image? It's not an image really, it's a logo. Your company has a name and a logo. The logo is part of the branding, so it belongs to all the styles, so it should be in your CSS.
JoostK
ok but in ur example nothing will be shown if images will be disabled
metal-gear-solid