...

View Full Version : Best option for adding color to specific words in a list



us3rd4n
07-20-2007, 06:17 AM
I have a list and i would like to add color to a few different words.

The changed words will all use the same color.

It needs to be xhtml strict.

Example:
Things you should not do.
<ul>
<li>Please do not run with scissors.</li>
<li>Do not swim after eating.</li>
<li>Do not try to climb that tree.</li>
</ul>

Is using span my best option?

_Aerospace_Eng_
07-20-2007, 06:25 AM
A span would probably be the best choice. Some will say that using a span is almost like using a font tag.

Arbitrator
07-20-2007, 06:47 AM
Is using span my best option?Using em or strong elements would probably be the most appropriate thing here.


Some will say that using a span is almost like using a font tag.Personally, I would only say that if you used the style attribute since youíre still not separating structure from presentation. Otherwise, span should be fine as long as there isnít a more specific element.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum