Welcome to jkg3.com

Jkg3.com is the online home of Jamie Knight and his plushie friend Lion. Jamie & Lion are an autistic duo designing websites in somerset england.

Find out more on the profile page.

Latest Journal Entry

Recently i found myself on the wonderful forum which is boag world. This, in itself is not a new thing, i have been there before. What was new though was that i was posting. I was wondering around in the critique section, when i gave some critique which raised a question which i have now seen a few time. Should the logo and tag line be represented with heading elements?

Something which i see a lot, is people who are using the img tag to include their logo at the top or( increasingly) the bottom of the page. This image is (though not always) accompanied with an alt tag that reads something like “our logo”. This image is also often linked to the home page.

I am sure the logic is that the image is content and that it should therefore be represented in the structure of the page, after all you would like your logo to be a prominent part of how you web page is assessed for search engines and by other bots and spiders.

The code for something like this would often look a bit like the following:

<div id="header" >
	<a href="path to index"><img src="path/to/image" alt="our logo" /></a>
</div>

But, what are the other options?

After reading transcending CSS (a great read) i realized that the logo and tagline, are content of a page like any other. On the scale of things they are also quite important content, after all that is why you chose the words in your logo and you tagline so carefully. So surely they should represent the most important headings on you page?

With this in mind, i was thinking about how to best markup my page header… avoiding presentational code. This is what i ended up with:

<div id="branding" >
	<h1><a href="path to index">jkg3.com</a></h1>
	<h2>Somthing Different</h2>
</div>

So, simply put, i have named the containing div “branding” as this describes the content. i have not used header because header is describing its position on the page (at the head) and the branding may not always be at the top of the page. I have not called it logo because it also contains my tagline.

Then i have used a <h1> element. My logic behind this is: When i was deciding on the name and the domain for my website (which in this case is the same thing) i thought about what the name means. I knew this was a very important part of the branding for my website and thus an important heading for the page. therefore i have made it a <h1> element.

A little about the anchor tag. Somthing i have often heard from other web developers, and clients is that they like the fall back navigation a clickable logo provides. By using an anchor element, set to display as a block, i have enable this to still happen, even though my logo image is set externally in the CSS.

For the tagline i am using the <h2> element. This is because when choosing a tagline i was aware that it was an important part of the branding; although, not as important as the logo. Using the <h2> element signifies this importance and should help spiders and bots to parse he page meaningfully.

Styling:

So now we have the semantic XHMTL, what about the styling?

The styling to make this show your logo is relatively simple. Using Phark Image replacement, i have moved my text inside the div element -5000px to the left and then made my logo the background.

I have then set the contained anchor ( <a> ) element to block level so that it fill the space above the logo and enables the required clickiable link.

The CSS looks somthing like this:

#branding {
	/* your logo or heading width here */
	width: 200px;
	/* your logo or heading hight here */
	height:40px;
	/* just to ake the exmaple clearer */
	border: #CCCCCC solid 1px;
	/* again for making the example cleaere */
	background:#F6F6F6;
	/* !importsnt this move the text out of the way to allow the branging / logo to show though */
	text-indent:-50000px;
}
#branding a {
	/*this sets the a element to a block, and enables the clickable region over the logo. */
	display:block;
	/*this helps to make the a block sit inside the h2 block.. this is not a requirement, but it helps with bug fixing */
	margin:0px;
	padding:0px;
}
#branding h1, h2 {
	/*this helps to make the a block sit inside the <h2> block.. this is not a requirement, but it helps with bug fixing */
	margin:0px;
	padding:0px;
} 

The comments explain what each rule is doing.

Why do this?

I am going to quickly sum up the advantages to using this method:

  • Screen reader friendly.
  • More accessible
  • Search engine (or any web spider) friendly
  • Separates content from presentation.
  • Allows for branding change entirely in the CSS
  • Makes producing handheld style sheet simpler

So here is another method for marking up branding on a webpage… what do you think? Leave a comment with how you feel!

I’d argue that your suggested method is inferior to using an image, and the use of the h1 is actually less accessible and search engine friendly.

Let’s take a blog as an example. In terms of accessibility, a screen reader will read out your H1 on every page. If the user is skipping between links they will start at H1 since this is the most important heading on the page – it should ideally describe the content of the page. Using H1 for your branding means the header describes the SITE organisation itself, not the PAGE content. Your main heading would have no relation to the specific content on any given page. I would suggest using an H1 in your suggested way for the home page, but child pages use them more appropriately.

In terms of SEO the same applies. A search engine will give significant weight to your heading tags. Putting your site name or logo inside the H1 is a waste since this text will most likely already be included in your domain name, alt tags and inbound link text anyway. I’d argue that a better SEO strategy is having your H1 describing the content on that partocular page using succinct keyword-driven copy.

hiya,

thanks for he comment.

I see your point, but i would have thought that the title tag is what is used to say about the particular page?

Also, i would think that if you were using an alt atribute for the image it would be read out anyway. As long as what you use is short (the site name for example) then i would not feel this poses an issue.

using the image you are adding presentational code to your markup and meaning that a complete site redesing is not possible with just the CSS.

This article is not a complete guide to SEO, hense i have not talked about the use of the keyword rich text etc.

hope this makes some sense.

licks

Hi Jamie,

I wonder if my site was the one to stimulate this post :)

Quote: On the scale of things they are also quite important content, after all that is why you chose the words in your logo and you tagline so carefully. So surely they should represent the most important headings on you page?

I was with you up to that point. I don’t agree there’s any surely about it – it’s a highly debatable topic, and I’m definitely on the opposite side of the table.

I think H1’ing the logo is a complete waste of the H1 from a semantic (and SEO) point of view, and incorrect.

I believe the most important thing on the page is the page content – not who the owner of the page is.

That’s why I use H1,2,3 for content, and div id=branding for logos, which are practically presentation only (they serve the purpose of credibility however).

Just another POV :)

Nice theme here btw, I came over from your critique request on boagworld. Here’s one comment – make the add comment text box bigger – it’s tiny!

Cheers,
Alastair.

hiya,

Thanks for the nice comments!

i am thinking that i may be being swayed by the argument about the h1 and h2 not being perfectly right.

but my question now is what is? they are not paragraphs so is is right to make the p’s?

licks

@ Alistair
You can re-size the comment box, just click in the bottom left corner and drag to size :-)

Leave your comment

Flickr Photos

More

Latest Content

I use a screen reader. I do, really, and i must admit, 99% of web sites drive me to spare. Even though i don’t like to admit it, even my own does. Time to explain.

More :: Comment [8]

The hCard microformat is a fantastic way of making the contact information on a page transition into other formats without needing to write tools to do it yourself, or support multiple download formats.

One of the key parts of this is for tools which will do that transformation. In this article I am going to talk about what some of the tools out there are, and talk a little about some of my own projects in this field.

More :: Comment [1]

Accessibility, the process of making you site accessible to all, site statistics are not the defining factor, but doing things the right way. Well, we are lucky that in most cases accessibility and web standards go hand in hand but what about when they don’t?

Is there a disability which million of people worldwide have which wont benefit from liberal application of web standards? I think there is, its called Internet Explorer 6.

More :: Comment [193]