Reputation: 111
Assuming I want to change the color of a single word within a paragraph.
My options seem to be: External, Internal or Inline CSS
, <font>
or <span>
.
What's the correct method?
Upvotes: 0
Views: 110
Reputation: 70
'font' may be deprecated in the near future so 'span' is the better option of the two because of that reason alone.
Always best to use external styles. Maybe add a class to your span, then you can use it again and again.
Most importantly, decide why you are adding colour to the text, if it is to emphasise a word, it would be best to use 'em' and style that using your stylesheet. If a user was blind, they would not see the colour but they would hear the 'em' when it is being read.
Upvotes: 0
Reputation: 944204
<em>
if you are doing it for emphasis, <body>
if you are doing it globally, etc). Add classes to existing elements if you need distinguish between two elements of the same type (i.e. be more specific about the reason than the type of element allows by itself). Upvotes: 2