Previous Message
Next Message

Re: [css-d] Font: or Font-Family:

Sent by Ben Nunn on 29 January 2002 11:11


> Hi gang,
>
> Elementary question. I've seen both font: and font-family: used. Which
> one is better, more compliant? Do both selectors (those are selectors
> right?) work fine in all browsers?
>
> Thank you! Hope you all have a great day today!

font-family: is a specific attribute selector, equivalent to the old <font
face>

font: is a shorthand selector, and can include family, color, weight etc. in
a single selector.

e.g.

font: Arial bold 12px;

is shorthand for

font-family: Arial;
font-weight: bold;
font-size: 12px;

Hope this makes it clear.

BTN
Previous Message
Next Message

Message thread:

Possibly related: