Dan Abrey said:
Use a CSS class - for example, between the <head> tags, add the
declaration. i.e.:
<style type="text/css">
<!--
.white {
color: #FFFFFF;
}
-->
</style>
Note that "<!--" and "-->" are dated techlore - they don't help anyone,
they just put a burden on the author (who occasionally e.g. mistypes
them, with odd results), and in XHTML they could really hurt.
Background should _always_ be specified when color is specified, and vice
versa. (Someone doesn't see this immediately? Maybe thinking that the
background is the same as the page's overall background? But
understanding this is a good criterion for understanding how the C in CSS
works.)
Replace the 'white' with any old name, and the colour with the colour
you want it to be coloured. Colour. Funny old word.
Yeah, CSS is _modern_ and uses the American Way.
But indeed, _replace_ 'white' with something that reflects the _meaning_
(semantic role) of the word. Only the author knows what it should be.
Once in a century, 'white' could be a meaningful class name - when the
word is quoted from a printed source and we wish to have the quotation
rendered in the same colors as the original. (Or maybe in a context where
the text mentions white and black people and you wish to distinguish
visually the names of the white from the names of the black.)
So this would be better (assuming the word is a person's name, for the
sake of concreteness):
<style type="text/css">
..person { color: #ffffff;
background: #333333; }
</style>
Using an external style sheet would normally be even better, but let's
leave something for lesson 2.
<span class="white">your word</span>
Replacing 'white' with the class name you used, minus the full stop.
And replacing <span> markup with some semantically significant markup,
such as <em> for emphasis, <strong> for strong emphasis, <kbd> for
presentation of keyboard input, etc., noting that such markup may imply
some default rendering and you need to take a position on that (e.g., by
overriding the common default of using italics for <em>, by setting
em.person { font-variant: normal; }).