RE: FN-FORUM: FW: ADH WebCreations
date posted 28th June 2007 19:04
Martin wrote:
> but basically if you wanted to change the text colour for example=20
> in a paragraphy I would something like this:
> some text, some text, some more =
text
.. except that that would be no better than using FONT tags!
The point of CSS is not to swap a code soup of FONT tags for a similar =
mess
of inline SPAN styles (or TABLEs for DIVs), but to mark-up the content
semantically (i.e., label its meaning) and control the presentation =
outside
the page from a centralised stylesheet.
Therefore a better example would be:
some text, some text, some more text
some text, Mr Bob Jones
some text, some text, some more text
We can then control the 'look' of all 'person' references using a rule =
in a
central stylesheet:
SPAN.person { color: red; }
Rather than having presentation rules hard-coded into the content =
itself.
Common mistake, but important for newcomers to CSS to understand early =
on if
we're to avoid a web composed of zillions of TABLE-like nested DIVs and
hard-coded inline styles.
Cheers, Ben
--
Ben Johnson, Neogic Web Solutions
// design . development . managed hosting