Forum Moderators: open

Message Too Old, No Replies

The best way to create headings

         

jfred1979

3:18 pm on May 28, 2003 (gmt 0)

10+ Year Member



Is there a reason to use heading tags (<h1>,<h2>, etc.) for headings rather than another method such as <span> with a style sheet rule attached? Block elements such as <h1> often introduce too big of a line break when I want the heading close to the text. Do SE's look specifically at heading tags, or is there any other reason I should stop using them?

papabaer

3:29 pm on May 28, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Headings are extremelyu important structural elements. Their importance is weight incrementally with <h1> carrying the most weight and <h6> the least. All are noted as containing important information.

You can control header margins using CSS:

h1 {margin-bottom: 10px;}
h2, h3 {marging-bottom: 0;}
and so on...

Never use a <span> to style text where a header is called for.

- papabaer

korkus2000

3:33 pm on May 28, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



On top of what papabaer said, yes SE use these in their ranking algos. Text used in an H1 tag is considered more important than other elements on the page.

jfred1979

4:02 pm on May 28, 2003 (gmt 0)

10+ Year Member



Thanks for the feedback, formatting the header margins with css is what I'll do.