PDA

View Full Version : Header tag + title attribute


matthewmurcia
25-08-2005, 11:39/11:39AM
I've been doing some reading today about header tags (h1, h2 etcc) and also lately about the title attribute on different elements.

Today I went over and looked at this W3 page about header tags and HTML 4.01 and discovered that it's also possible to give the header tag a title attribute

http://www.w3.org/TR/html4/struct/global.html#edef-H1

Now, whilst realizing that opinions are a bit divided and that title attributes on some elements are very important from a usability/accessability point of view, given the importance of the header tags for both users and SEs, what would you all say about the possibility of adding a title attribute in the header tags on a page?

Example
<h1 title="this is the page title">This is the Page Title</h1>

P.S. I just realised I posted this in the wrong sub forum. Please move it.

WebSavvy
25-08-2005, 12:02/12:02PM
If you want to make your site accessible for speech readers to allow access of your pages from non-sighted visitors, title tags are necessary in all header attributes.

Quadrille
25-08-2005, 12:02/12:02PM
Pointless!

<Hx> tags define how a title looks on the page, so it needs to go in the <body>.

The <TITLE> tag does the job in the header.

Both are important, but they are not directly related.

As the <title> is used in many SEs and directories, it makes sense that it echoes the <H1> tag, but not necessarily, as the site title may be contained in an image.

ihelpyou
25-08-2005, 12:03/12:03PM
Hi, Yes, you can give a title attribute to any word or sentence you wish. If you are wondering if it's good for se's, I doubt they really care and most likely ignore them.

WebSavvy
25-08-2005, 12:07/12:07PM
Reading your post a second time, I didn't notice you meant the "page title" as in title of the document.

That must be in the
<head></head>
tags ... located between the
<title></title>

Now, if you mean <Hx> tags, speech readers use title attribute of Hx tags.

Example:

<h1 title="How things work.">How Things Work</h1>

<h2 title="Setting a good example.">Setting a Good Example</h2>

matthewmurcia
25-08-2005, 12:26/12:26PM
hmmm thanks for your quick answers, gents.

Quadrille and savvy, I meant <h> tags with a title attribute like this:

<h1 title="title of page">Title of Page</h1>

So it would seem it helps people with difficutlies and might just possibly be one o f lots of things taken into account by a SE

ihelpyou
25-08-2005, 12:28/12:28PM
I doubt it's taken into account at all by se's.

Quadrille
25-08-2005, 12:44/12:44PM
Originally posted by matthewmurcia
I meant <h> tags with a title attribute like this:
<h1 title="title of page">Title of Page</h1>
So it would seem it helps people with difficutlies and might just possibly be one of lots of things taken into account by a SE No problem; it will either be take up - or ignored.

I'm not convinced of the value, as I think <Hx> tags would be readable anyway, but it won't do any harm.

There's no evidence - at this point - that SEs give it any special value, and I see no reason why they should, as it will duplicate the actual title. Won't it?

matthewmurcia
25-08-2005, 15:05/03:05PM
Ok, thanks for the answers. Another small step.

g1smd
25-08-2005, 15:11/03:11PM
Header tags are the tags between the <head> and </head> tags.

The <hx> tags in the <body> section are heading tags.

I think that is where the initial confusion arose.