homepage Welcome to WebmasterWorld Guest from 54.242.200.172
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: DrDoc

CSS Forum

    
h1 h2 basic question
jackdack




msg:3167593
 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
.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

 

whoisgregg




msg:3167603
 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>

becomes:
<h1>some text</h1>

jackdack




msg:3167675
 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)

pixeltierra




msg:3167677
 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.

jackdack




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

thanks for answers and recommendation

gello




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

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

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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved