Forum Moderators: not2easy

Message Too Old, No Replies

A question about <h1> tags for titles

         

Member02

7:55 am on Oct 11, 2006 (gmt 0)

10+ Year Member



I know it’s best to have your headers in a <h1>…</h1>, but will it lessen the importance and affect of the <h1>…</h1> tag if it has class=”class-to-css” used inside it for stylesheet use?

For example: <h1 class=”for-css”> Title </h1>,

Is the above example bad or good? Will that have any less affect (or more affect) on how search engines see it?

[edited by: Member02 at 7:55 am (utc) on Oct. 11, 2006]

londrum

1:26 pm on Oct 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



it won't have any affect at all. that's how they encourage you to do it these days -- use h1 tags and style them with css.

... as long as you don't use {display:none} in your css, of course. search engines are supposed to be able to pick that up now.

tedster

12:52 am on Oct 12, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Don't forget that you can define a default set of style rules for an html element -- including H1. Since H1 should only be used once per page, that kind of mark-up is never really required for an H1 tag!

1. Define the rules for h1 in the .css file
2. If an occasional page uses a different rule, either import a second .css file, or put the changed rule in the <head> -- in other words, use the cascade.

Member02

12:22 am on Oct 14, 2006 (gmt 0)

10+ Year Member



Can a LINK be placed in a <h2> tag?

Robin_reala

1:09 am on Oct 14, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, but think: should the link be a heading? If so then go ahead.

swa66

2:36 am on Oct 15, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



These are actually html issues, not css ...

Since H1 should only be used once per page

Hmm, is there an authorative source that says you should only use H1 once per page? AFAIK W3C only says something about the title tag, not about the h1 tag.

Can a LINK be placed in a <h2> tag?

Yes, of course.

E.g.:
<h2>before <a href="#">test</a> after</h2>

JAB Creations

5:15 pm on Oct 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There are no such things as tags.

There is a h1 element however. :)

Please ensure you use correct terminology in regards to syntax.

- John