|
Posted by Jonathan N. Little on 01/26/06 17:45
John Salerno wrote:
> I understand that you shouldn't use these tags to italicize or bold
> text, but what exactly is meant when you want to "emphasize" text? It
> seems like any use of <em> is somehow tied to the fact that it will use
> italics, and I wonder if people would use it as much if it didn't. So
> I'm trying to grasp how you really use it for markup only.
>
> Also, as an example, what if I had a sentence like this:
>
> "The word void in a function indicates that there is no return type."
>
> If I'd like 'void' to stand out from the rest of the sentence (and
> ideally have it italicized), should I use <em>? I know I should have
> italics as a consideration when I choose <em>, but like I said it's hard
> not to.
Basically I think <em> is by default tied to italic by tradition in
print, but of course you can always change this to something more to
your liking in your stylesheet
>
> The only other option I can think of would be:
>
> <span class="keyword">void</span>
>
> but is that a better way to do it?
Depends if you are just highlighting a specific word or phrase then 'em'
and 'strong' will do but if there is some underlining theme to the
emphasis then I could see where classes can be very useful, e.g.
..keyword { color: #080; }
..constant { color: #f00; }
..command { color: #008; }
<span class="keyword">void</span>
<span class="constant">NULL</span>
<span class="command">sub</span>
which gives you the flexibility if latter you rethink the color coding a
bit garish then all you have to do is change your stylesheet...
..keyword, .constant, .command { color: #f00; font-weight: bold; }
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Navigation:
[Reply to this message]
|