Reply to Re: Semantics & <h1>, <h2>, etc

Your name:

Reply:


Posted by Spartanicus on 08/07/06 21:57

"David Woods" <feed_sheepREMOVETHIS@sbcglobal.net> wrote:

>I appreciate the many discussions about marking up a page semantically. I
>don't mean to rehash old arguments/discussions, but I am a little confused
>as to the proper way to handle headers.
>
>In the web pages I have created I typically put a div stretching across the
>screen in which I put a logo, the title of the organization, and possibly
>other pictures, slogans, etc. In the main content div, I typically will put
>a unique header for that page followed by paragraphs, etc.
>
>What should be marked up as <h1></h1>? The title of the organization in the
>header/banner div? Or, the first header in the main content div?

On the home page you should typically mark up the name of the
organisation as the h1 content and the title. On other pages on the same
site the topic of that page should be marked up as the h1 content.

So the home page of Widgets Inc would have <h1>Widgets Inc</h1> on the
home page, and <h1>About Us</h1> on the "about" page, with "About Us -
Widgets Inc" as the title.

Note that if the name of the organisation is provided as an image then
for the home page the image should be the h1 content with the name as
the alt content, so <h1><img src="foo.bar" alt="Widgets Inc"></h1>.

Often such a graphic would also be repeated on every other page to
create a consistent feel on a site, note that on pages other than the
home page the image should then be coded as decorative, i.e. no alt
content or code it as a CSS background image.

The caveat with a <h1><img src="foo.bar" alt="Widgets Inc"></h1>
construct is that the alt content is not picked up by some popular
search engines (like Google). SE's apply greater weight to h1 content,
so if SE ranking is important you should consider using an <object>
element instead of an <img> element for the home page. Since IE doesn't
render images embedded with the object element correctly, a dual object
& img element construct is needed combined with so called "IE
conditional comments". An example:

<h1>
<!--[if IE]><img src="logo.gif" width="10" height="50" alt="Widgets
Inc"><![endif]-->
<!--[if !IE]>--><object type="image/gif" data="logo.gif">Widgets
Inc</object><!--<![endif]-->
</h1>

IE will use the <img> construct, other browsers and search engines will
use the <object> construct.

--
Spartanicus

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация