Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2005-12-12 17:24:49

aesop1
Archived Plugin Author
Registered: 2004-09-19
Posts: 142

Re: Alternative to <h1>

I agree, Stuart — there are no hard and fast rules — which is precisely the point that it isn’t “correct” to impose an artificial set of hierarchy rules across a web site via heading tags (which might be meaningful to the site designer, but meaningless to the search engine or web site visitor).

This is also why title element construction can vary — it has to make sense in the context of the information you are trying to convey. No hard and fast rules there either — I just threw out my title construction (which isn’t used in all instances, but many) as one example. If someone is organizing their site with TXP categories, then they may want the title to reflect that instead. So, <code><txp:page_title></code> isn’t inherently wrong or inefficient either. For a simple site it will suffice just fine!

But at the end of the day you probably want to be noticed by search engines, so follow the practices that will get your site noticed — on a page-by-page basis — without worrying about the overall site semantics of heading tags.

Given the search engine consideration, I will have to seriously consider Stuart’s title construction for my own sites: it might be more effective than mine!

Niconemo, I agree—good thread. It is important to consider all these things.

Last edited by aesop1 (2005-12-12 17:26:11)

Offline

#17 2005-12-12 19:39:02

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Alternative to <h1>

Given the search engine consideration, I will have to seriously consider Stuart’s title construction for my own sites: it might be more effective than mine!

Stuart’s suggestion is also effective for users when bookmarking URLs from the same site. I mean, if you bookmark more than one article (ie. URL) from the same site, I think it’s easy to find it if the bookmark title starts with the article title, and not with the site name (repeated several times).

An ontopic question:
What is the importance of H1 in SEO? Really, I dont know, so any link/hint/advice will be welcomed.

If you do a search on Google, you will get results with the following structure (some text removed for brevity):

The content on the title element
some… ¿random?… words…
… on the linked… page…
mysite.com/myarticle

Where is the H1 in a search result?
I dont have any doubt that is important to keep a well-marked-up-and-structured document to improve SEO.

Finally, it’s good to know that Textpattern gives all the possibility of using different headings hiearchies and titles (so, keeping everyone happy) in different contexts (homepage, section/category article list, individual-article, etc) by simple using some conditional tags magic.
Those who want to use H1 always for the site name, can do it easily, and those who want to have “dynamic” H1, too.

Last edited by maniqui (2005-12-12 19:42:27)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#18 2005-12-13 02:06:14

paularms
Member
From: University of Minnesota
Registered: 2004-10-21
Posts: 155
Website

Re: Alternative to <h1>

To answer your question, maniqui,

Where is the H1 in a search result?

It doesn’t necessarily show up in the search results, but the information in an h1 tag is generally given more weight than other markup elements in a document. Therefore, if the page is easily summarized in a few words, people searching for those words are more likely to find your page.

Last edited by paularms (2005-12-13 02:06:49)

Offline

#19 2005-12-13 05:44:55

aesop1
Archived Plugin Author
Registered: 2004-09-19
Posts: 142

Re: Alternative to <h1>

Interestingly enough, I was just doing a “view source” on alistapart.com and saw this . . .

For the title element:

<code>
<title>A List Apart: Articles: Printing a Book with CSS: Boom!</title>
</code>

The masthead:

<code><h1 id=“masthead”>
<a href=”/”><img src=”/pix/alalogo.gif” alt=“A LIST Apart: For People Who Make Websites” /></a>
</h1></code>

And a little further down (the current article title) . . .

<code>
<h1 class=“title”><a href=”/articles/boom”>Printing a Book with CSS: Boom!</a></h1>
</code>

This usage seems to marry usage recommended by several of us in that it does both: 1) allows for multiple h1 tags on a page and 2) Gets the “site title” through the ALT attribute in the image tag within the first h1 element.

I like the idea of using a masthead image within an h1 tag.

Last edited by aesop1 (2005-12-13 05:47:29)

Offline

#20 2005-12-14 18:40:30

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Alternative to <h1>

Amigos,

How would you apply some of this concepts to an eCommerce site? I need/give some advices :)

  • in individual product page
    • product name as H1? or
    • site name as H1?
  • in title element
    • [product name] | [site name] or
    • [site name] | [product name] (i think I like this one for search site results)
    • slogan in title? I think only for the homepage -> conditionals magic.
  • what about section/categories (article list) pages?

Thanks in advance.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#21 2005-12-15 01:44:18

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Alternative to <h1>

For the page is the product name going to appear further down such as in an h2? If so I would stick to using the sitename in the h1. If not use the product name followed by the site name.

In the title element I would use Product – Site name – Section (as long as it isn’t “default”). I don’t usually bother with categories as I think it can be a bit confusing particularly if section is in there.

That’s all just my own opinion of course. ;)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#22 2005-12-15 02:01:57

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Alternative to <h1>

thanks for share your opinion, Stuart.

For the page is the product name going to appear further down such as in an h2? If so I would stick to using the sitename in the h1. If not use the product name followed by the site name.

Now, but that remembered me something: I use subheadings inside the product description (article)… that are “textile-coded” (hardcoded) as h3, so if I apply h1 to the product name (article title), the next heading will be an h3…
I know that isnt a sin to do that… but I want to keep some good practices and consistency.

A workaround could be to code the subheadings as h2, because it’s probably that they wont show up in article-list context (where h2 will be used in product name). They will show up only in individual-article (= individual-product) pages…


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#23 2005-12-20 20:57:24

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Alternative to <h1>

What do you think of using just an <img /> (or an @<a href=”“><img /></a> inside a heading?

I mean, things like:

<h1><img /></h1>
<h1><a href=""><img /></a></h1>

Does it makes any sense to wrap an image, or a linked image with a heading element?

I have seen it in more than one place. Example: Mozilla Corporation
They have both the h1 and the h2 “filled” with linked images…

<hr size=“1” />

maniqui though:

I use subheadings inside the product description (article)… that are “textile-coded” (hardcoded) as h3, so if I apply h1 to the product name (article title), the next heading will be an h3…
I know that isnt a sin to do that… but I want to keep some good practices and consistency.

Jeremie wrote:

Other CMS deal with this by automatically increment the headings withing an article.

Interesting feature!
So, does it mean that the CMS will wrap subheadings (headings inside an article) in relation to the heading level of the article title?

That’s could be a great feature…
For example, if in article-list context, the article title has a h2, and the article subheadings (marked up with some special textile that has to be thinked yet <sup>(*)</sup>) are automatically wrapped in h3.
And if you are in individual-article context, the article title has a h1 and the article subheadings are automatically wrapped with h2.

A first problem could be how to detect which heading level is wrapping the txp:title. Dont know if possible…

<sup>(*)</sup>The textile mark-up could be something like: hn., hnn., hnnn. and so on.

Last edited by maniqui (2005-12-20 21:00:29)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#24 2005-12-20 21:59:33

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Alternative to <h1>

I would say that for your h1 examples the “alt” attribute content would be very important and maybe the “title” attribute in the “a” tag.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#25 2005-12-21 09:56:50

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: Alternative to <h1>

maniqui wrote:
What do you think of using just an <img /> (or an @<a href=”“><img /></a> inside a heading?

Seems strange. Well, apart from some special cases, I would say it’s not that good. Mostly, if the meaning of your header is text (and for example you use image to handle special font), it should be a no-no (and use image replacement in that case). I’ll take a look at the Mozilla site.

Interesting feature!
So, does it mean that the CMS will wrap subheadings (headings inside an article) in relation to the heading level of the article title?

Yes. In Plume-CMS, each article could have chapter, it’s like a sub-article. So the structure is like this :

<ul><li>The article title</li><li><ul><li>A chapter title</li><li><ul><li>The headers in that chapter</li></ul></li><li>A chapter title</li><li><ul><li>The headers in that chapter</li></ul></li><li>A chapter title</li><li><ul><li>The headers in that chapter</li></ul></li></ul></li></ul>

In the article markup (called wiki langugage, similar to Textile and other cms things) you apply header1, header2, just like anywhere else. But when the CMS render the pages to the public, it will automaticaly call the article title h1, then the chapters titles h2, then the article header1 h3 and so on (but only if there are multiple chapter, if there is only one it’s handled of course).

Very nice feature yep. I think I mentioned it in the feature request forum a while ago (at the end of the TXP gamma stage iirc).

If you’re interested you could take a look at Plume. It’s PHP and GPL, so maybe there are some code that could be re-used for a TXP patch or plugin.

Last edited by Jeremie (2005-12-21 09:57:27)

Offline

Board footer

Powered by FluxBB