homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

h1 h2 basic question

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

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)

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)

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)

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)

thanks for answers and recommendation


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

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

Hope will help you

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved