Where to put the css class for text?

Discussion in 'HTML' started by John Sutter, Feb 3, 2004.

  1. John Sutter

    John Sutter Guest

    I have a list of orders in a html table. Each order is a link and it's
    contained in a td. I would like to format the text displayed using css.
    Where should I put the css class name? In the TD tag or in the font tag or
    somewhere better?

    For example:

    ..... <TD class="ordertext"><a href=...>Order #1</a> </td>
    or
    .... <TD><font class="ordertext"><a href=...>Order #1</a></font> </td>
    or
    ??

    John
    John Sutter, Feb 3, 2004
    #1
    1. Advertising

  2. John Sutter

    Mark Parnell Guest

    On Mon, 2 Feb 2004 16:23:51 -0800, John Sutter <>
    declared in alt.html:

    > I have a list of orders in a html table.


    Sounds like it *could* be tabular data. ;-)

    > Each order is a link and it's
    > contained in a td. I would like to format the text displayed using css.


    Glad to hear it.

    > Where should I put the css class name? In the TD tag or in the font tag or
    > somewhere better?
    >


    What font tag? You don't mean you are thinking of using <font>, which
    was deprecated in favour of CSS, to apply CSS styles?

    Anyway...

    >
    > .... <TD class="ordertext"><a href=...>Order #1</a> </td>


    If it applies to every link in the table, why not apply it to the table?
    Then you only have to put it in once. :)

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    Mark Parnell, Feb 3, 2004
    #2
    1. Advertising

  3. John Sutter

    Richard Guest

    John Sutter wrote:


    > I have a list of orders in a html table. Each order is a link and it's
    > contained in a td. I would like to format the text displayed using css.
    > Where should I put the css class name? In the TD tag or in the font tag
    > or somewhere better?


    > For example:


    > .... <TD class="ordertext"><a href=...>Order #1</a> </td>
    > or
    > ... <TD><font class="ordertext"><a href=...>Order #1</a></font> </td>
    > or
    > ??


    > John


    Depends on how you want to use it.
    <table class="x"> would be for the entire table.
    <tr class="x"> for the entire row.
    <td class="x"> for the single cell.

    Don't use the font tag. Instead, put that in your css stuff using the font:
    attribute.
    Richard, Feb 3, 2004
    #3
  4. John Sutter

    Richard Guest

    Mark Parnell wrote:

    > On Mon, 2 Feb 2004 16:23:51 -0800, John Sutter <>
    > declared in alt.html:


    >> I have a list of orders in a html table.


    > Sounds like it *could* be tabular data. ;-)


    I'd still like to know who it is that defined tabular=tables.
    Probably the same guy who designed css.
    Why do people use tables for layout presentation?
    Because it's simple and easy to do and accepted worldwide.
    Show me a web editor that creates divisions in the same manner as tables.

    I'll bet a peso you can't do it.
    But every editor I've seen has a table generator.
    Richard, Feb 3, 2004
    #4
    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. E11
    Replies:
    1
    Views:
    4,716
    Thomas Weidenfeller
    Oct 12, 2005
  2. Replies:
    5
    Views:
    1,102
    Ian Rastall
    Jun 29, 2005
  3. Noozer
    Replies:
    1
    Views:
    7,103
    Carolyn Marenger
    Mar 13, 2006
  4. Gabriel Rossetti
    Replies:
    3
    Views:
    534
    Jerry Hill
    Apr 25, 2008
  5. Replies:
    8
    Views:
    387
    Greg Herlihy
    Jun 28, 2008
Loading...

Share This Page