Emphasize

S

shapper

Hello,

I am displaying some statistics and I want to emphasize the values.
For example:

<ul>
<li>30% of posts are recent</li>
<li>There are 20% of posts untagged</li>
<ul>

I might want to change font, size, etc ...

Using a span would be the best option?

<ul>
<li><span>30%</span> of posts are recent</li>
<li>There are <span>20%</span> of posts untagged</li>
<ul>

And then apply a class to it?

Thanks,
Miguel
 
R

rf

shapper said:
Hello,

I am displaying some statistics and I want to emphasize the values.
For example:

<ul>
<li>30% of posts are recent</li>
<li>There are 20% of posts untagged</li>
<ul>

I might want to change font, size, etc ...

Using a span would be the best option?

There is a whole element designed specifically to emphasise things:

<ul>
<li><em>30%</em> of posts are recent</li>
<li>There are <em>20%</em> of posts untagged</li>
<ul>
 
D

dorayme

shapper said:
Hello,

I am displaying some statistics and I want to emphasize the values.
For example:

<ul>
<li>30% of posts are recent</li>
<li>There are 20% of posts untagged</li>
<ul>

I might want to change font, size, etc ...

Using a span would be the best option?

<ul>
<li><span>30%</span> of posts are recent</li>
<li>There are <span>20%</span> of posts untagged</li>
<ul>

And then apply a class to it?

You would not need to apply a class to it if there were no spans in list
items elsewhere which you do not want to style similarly.

li span {...}

would do.

Or you could class the ul element

ul.postInfo span {...}

If you just want to emphasise some text, you could use <em> instead.
And, of course, you can style em in your css sheet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top