Forum Moderators: phranque

Message Too Old, No Replies

H1, H2 Tags - What are they?

Do they really make a difference

         

Liane

11:07 pm on Sep 25, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Some months ago, NFFC mentioned in passing that I should change some of my html to include H1 and H2 tags. Since I don't know what they are (she writes looking like a puppy who just peed on the carpet) ...I have no idea what they do, their value, why or where I should use them.

I know this is webmaster 101 stuff ... but there you go. That's where I am at!

beasscr

3:59 pm on Oct 12, 2001 (gmt 0)



Netcommer, are you saying that you should not repeat a heading tag more than once? Why?

Also you mentioned that nesting font tags withign the <H> tags will read as font. How do you suggest getting around the appearence of the large text if nesting is a no-no?

tigger

4:18 pm on Oct 12, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



beasscr

use a CSS, try this <STYLE TYPE="text/css">

H1 {font-family: arial,helvetica; font-size: 16pt; color: #??}

</STYLE>

you can then make the font size whatever you want

tedster

4:41 pm on Oct 12, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>> AFAIK, there are no search engine spiders currently requesting external .css files, so your secret should be safe.

Even if the SE spiders start taking external CSS files, changing the size of an H tag shouldn't be a problem -- H tags are really about logical structure, and not visual rendering. That's why netcommr's input about not placing them out of order is important.

However, this is the first I've heard anyone recommend not repeating the same H tag number on a given page. I don't quite get why that's a problem. Documents of all kinds have more than one same-level heading. Using two similar H tags would still create a valid information structure, wouldn't it?

netcommr

3:36 pm on Oct 13, 2001 (gmt 0)

10+ Year Member



Let me rephrase that. You should not use an H1 tag more than once. Since the H1 tag is supposed to headline the main topic or the most important area of a page, then having 2 or more of them is 'usually' not a true logical stucture of the document. What I stated above was mainly for the main topic, though multiple supporting sections to a page is many times needed, so multiple H2, H3, etc. should be OK.

Take this [w3.org] page for example,

The headline of the page is the H1 tag, it is the main topic for the page, this page should only have 1 headline. I does mave multiple sections of the page, therefore multiple H2's, and under each H2 you can hace multiple H3's. This is also why you don't want to skip from an H1 to a H3, it would not be logically structure.

How I stated it above was wrong, I should have said you should usually never use an H1 more than once.

... I tend to think of the H1 tag as
the 'displayed' <title> of the document, in many instances

try this on your next test page

<h1>copy of title tag</h1>
copy of description
<h2>focused statement</h2>
<p>body text...

tedster

4:10 pm on Oct 13, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks netcommr. We're totally on the same page.

So to wrap it all together, H tags are about the information structure, not the visual rendering. This is an inheritance from SGML, which is HTML's parent language.

Browsers originally had a specific way of rendering H tags visually. With the advent of CSS we can play with that, but the informational hierarchy is what it always was, and highly important for a well formed page that makes an algorithm smile.

This 35 message thread spans 2 pages: 35