CSS id or class?

Discussion in 'HTML' started by mark | r, Jan 19, 2004.

  1. mark | r

    mark | r Guest

    am i correct in that ID can only be used for one element and that class is
    to be used for multiple elements needing a collective style?

    i am confused!

    mark
     
    mark | r, Jan 19, 2004
    #1
    1. Advertising

  2. In article mark | r wrote:
    > am i correct in that ID can only be used for one element


    Yes. Other thing is that if you have id, you can link directly to the
    element.

    > and that class is
    > to be used for multiple elements needing a collective style?


    Yes, but of course you can use it for just one element too.

    --
    Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
    Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
    tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.
     
    Lauri Raittila, Jan 19, 2004
    #2
    1. Advertising

  3. in news:400baada$0$27800$,
    mark | r typed:
    > am i correct in that ID can only be used for one element


    yes.


    > and that
    > class is to be used for multiple elements needing a collective style?
    >


    yes.


    > i am confused!


    you underestimate yourself.
     
    Disco Octopus, Jan 19, 2004
    #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. Eric
    Replies:
    4
    Views:
    747
    clintonG
    Dec 24, 2004
  2. E11
    Replies:
    1
    Views:
    4,842
    Thomas Weidenfeller
    Oct 12, 2005
  3. christopher diggins
    Replies:
    16
    Views:
    769
    Pete Becker
    May 4, 2005
  4. Joseph Turian
    Replies:
    5
    Views:
    607
  5. Ciaran
    Replies:
    9
    Views:
    520
    dorayme
    Mar 23, 2007
Loading...

Share This Page