Emphasize

Discussion in 'HTML' started by shapper, Oct 17, 2008.

  1. shapper

    shapper Guest

    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
     
    shapper, Oct 17, 2008
    #1
    1. Advertising

  2. shapper

    rf Guest

    "shapper" <> wrote in message
    news:...
    > 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>
     
    rf, Oct 17, 2008
    #2
    1. Advertising

  3. shapper

    dorayme Guest

    In article
    <>,
    shapper <> wrote:

    > 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.

    --
    dorayme
     
    dorayme, Oct 17, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. shapper

    Emphasize value

    shapper, Oct 20, 2008, in forum: HTML
    Replies:
    3
    Views:
    487
    shapper
    Oct 23, 2008
Loading...

Share This Page