Forum Moderators: not2easy

Message Too Old, No Replies

H1 headings in CSS

         

Jon_King

2:15 am on Dec 1, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Keeping with the Wizzard of Google's (Brett_Tabke) "Quick Rank List" I ask, is there a way to have a H1 heading (for ranking purposes) using CSS?

fathom

2:21 am on Dec 1, 2002 (gmt 0)

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



Sure is.

Generally should be the first line of text on the page, and the CSS defines font color, size, and font families.

It is also best to use only once per page and to have a complete paragraph after the H1 use and before using any other H-Tags.

Jon_King

2:34 am on Dec 1, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Possible as part of a style or in a style sheet?

deejay

2:39 am on Dec 1, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yep, I've just started using CSS heavily on a new site... and it's just wonderful to use. Pages are much less cluttered, and it's so easy.

There's a great resource here [richinstyle.com...] for learning CSS.

For a real quick example, applying it to an h1 heading is as simple as putting the following in your header. Then use the H# tags exactly as normal, and they will pick up the format from the CSS.

<style type="text/css">

H1 { FONT-FAMILY: TIMES, SERIF; FONT-SIZE: 24px; FONT-WEIGHT: bold; COLOR: #cc0000}
H2 { FONT-FAMILY: VERDANA, ARIAL, SANS-SERIF; FONT-SIZE: 14px; FONT-WEIGHT: bold; COLOR: #115599 }

</style>

Jon_King

2:58 am on Dec 1, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes indeed, very elegant!

Thanks so much, I will study the link provided.

fathom

3:37 am on Dec 1, 2002 (gmt 0)

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



Jon_King in addition to deejay excellent CSS link and summary you may also want to use an external CSS to help keep the file size down on your html pages.

e.g. - <link rel="stylesheet" href="style_sheet_name.css" type="text/css">

vice <style type="text/css"></style> in the html page header.