Welcome to WebmasterWorld Guest from 54.160.177.33

Forum Moderators: not2easy

Message Too Old, No Replies

h1 h2 basic question

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

Junior Member

10+ Year Member

joined:Aug 1, 2005
posts:155
votes: 0


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

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?!)
thanks

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

Senior Member

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

joined:Dec 9, 2003
posts:3416
votes: 0


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>

becomes:
<h1>some text</h1>
6:23 am on Nov 25, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 1, 2005
posts:155
votes: 0


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)

Full Member

5+ Year Member

joined:Apr 30, 2006
posts:298
votes: 0


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)

Junior Member

10+ Year Member

joined:Aug 1, 2005
posts:155
votes: 0


thanks for answers and recommendation
11:01 am on Nov 27, 2006 (gmt 0)

New User

5+ Year Member

joined:Nov 12, 2006
posts:26
votes: 0


I understand that you learn this.
Here is a fine tutorial
[w3schools.com...]

Hope will help you