Sent by Petr Stanicek on 16 May 2003 07:07
On Friday, May 16, 2003, at 06:22 Europe/Prague, Gerard Samuel wrote:
> Is it possible to emulate <code> tag formatting via css?
In fact, there is nothing to emulate ;)
Tags in (X)HTML have only their *semantic* meaning, the design is made
by styles. If you use e.g. the <code> tag, you say to the output
device: "this part of document is a code; hey device, don't forget it
at presentation time."
The device, if it's a computer browser, uses its own default style
sheet, where is written how to present <code> (and every other element)
when other style definition isn't available. Common style sheet for
HTML 4 contains for <code> only one rule:
code { font-family: monospace }
This is the only difference from the base text in most browsers.
However, you can add more formating if you like.
Well, from the semantic point of view, the best way to emulate the
<code> tag, is *to use* the <code> tag. The semantic cannot be
emulated. If you just want another kind of element to be formatted like
<code>, simply use font-family:monospace in its CSS definition.
________ ,_ ______________________________
Petr STANICEK <>< aka -pixy-
mailto: [EMAIL-REMOVED] http://www.pixy.cz
__________________________________________
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/