Forum Moderators: not2easy

Message Too Old, No Replies

Learning the Defaults

is there a reference?

         

Emperor

12:56 am on Dec 31, 2004 (gmt 0)

10+ Year Member



Hi guys,

Where can I learn the default styles for tags. For example, I assume the <b> tag is 'font-weight: bold' and so on. Is there such a list? Do the built-in HTML tags actually have default styles defined?

Thanks,
Cyrus

rjohara

1:06 am on Dec 31, 2004 (gmt 0)

10+ Year Member



Todd Fahrner did some of the early work on this, and his page on the base stylesheet and its epidemiology [style.cleverchimp.com] is still useful. There's a similar page on W3C somewhere, derived from Fahrner's work.

createErrorMsg

3:24 am on Dec 31, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do the built-in HTML tags actually have default styles defined?

They do, but unfortunately they vary between browsers.

My advice in dealing with this is to:

(A)zero out and explicitly set your own values for anything that you deem important to maintain uniform across browsers. This would include margins and padding, UL bullet images, font-sizes for p and hx, etc.

(B)Download and install the webdeveloper extension on FireFox and use the outline feature to see how and where and to which elements default margins, padding, etc are being applied (at least, where they're being applied in FF). Although the numbers may be different between browsers, the proportions are about the same, so this can give you a decent idea of what to expect from each element.

Sorry it's not really an answer to your question, but at least it's something.

cEM

MatthewHSE

8:20 pm on Dec 31, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What cEM said is the best thing to do. Don't count on any defaults; reset them all to your own values at the top of your stylesheet. Then over-ride these values as necessary later on in your stylesheet.