Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

h1 h2 basic question



2:43 am on Nov 25, 2006 (gmt 0)

10+ Year Member

i have a site that doesn't use header tags and i want to implement them. The css file contains entries such as

which would correlate nicely with h1,h2,h3

can i just do a replace in the css and html to
.largetext > h1
.midtext > h2
.smalltext > h3

or do header tags get setup differently in css? I saw another site's css and their header tags didn't start with a dot (whats the difference?!)


3:02 am on Nov 25, 2006 (gmt 0)

WebmasterWorld Senior Member whoisgregg is a WebmasterWorld Top Contributor of All Time 10+ Year Member

In your CSS files you can change .largetext to h1, etc. but in your HTML you need to change the whole tag name to an h1.

For example, this:

<p class="largetext">some text</p>

<h1>some text</h1>


6:23 am on Nov 25, 2006 (gmt 0)

10+ Year Member

excellent thank you. also on that note, the site doesn't use the p tag, instead using another class (.textbody). do you know what the implications are for using .textbody instead of p tag? (should it all be changed or does it not matter...? i gather h tag affects searchengines)


6:37 am on Nov 25, 2006 (gmt 0)

5+ Year Member

Use standard html markup for as much of the site/page as possible.

h1 means it's important, h2 almost as important, etc. That is meaningful to a browser, to a search engine, to a mobile browsing device. It's best to use semantic markup, and then style it to fit the user.

As far as CSS, all tags (p, hi, li, ect) don't have dots in front. All classes have dots, and all id's have #. It's easy. Tutorial abound on the subject. I recommend the maxdesign selectTutorial. Good luck.


7:23 am on Nov 25, 2006 (gmt 0)

10+ Year Member

thanks for answers and recommendation


11:01 am on Nov 27, 2006 (gmt 0)

5+ Year Member

I understand that you learn this.
Here is a fine tutorial

Hope will help you


Featured Threads

Hot Threads This Week

Hot Threads This Month