Fighting with CSS questions – a way from newbie to master CSS

May 4, 2007

7th ques: Why & When we use id & class?

Filed under: --- Level: 2, ♥ List of CSS Questions — cssquestions @ 3:49 am

id & class is the heart of CSS. Do you know why we need to use id & class. And when we use “id”, when we use “class”?

 This is an VERY, VERY, VERY important question.

And one more extra question: do you know what does “div” mean? what “div” is stand for?



  1. As some examples on web I’ve seen, “class” is used to group elements and id to to identify one unique element.
    Classes are used to style just a few of tags in a way. “Ids” work exactly like “classes” except for one thing; you can only have one “id” with a certain name in each of your HTML documents.

    Div is short for “division”. I’m very confused about div. Can u explain more?

    Comment by trang do — May 4, 2007 @ 3:15 pm

  2. Google: CSS box model

    And read some about “box model” in CSS box, or view it on CSS training Video.

    Anh then, if you still don’t understand, i’ll explain it 😀

    Every tag (h1, p, a, etc.) creates a box, and div-tag, of course, create a box.

    id & class is the way we use to name the tag(s).

    Comment by cssquestions — May 5, 2007 @ 5:54 am

  3. Use English please!!!

    You’d better go back to w3schools 😀 to do the quiz again :p or go to the next question -> …8th-ques-css-quiz-from-w3schools
    and The Only Ten Things To Know About CSS

    Remember to record your test.

    And maybe this one is useful for u -> 10 amazing things newbies may not know about CSS

    —edited by admin—-

    Comment by Trang do — May 8, 2007 @ 3:44 pm

  4. Trang, use English, please. I’ve edited your last post.

    Comment by cssquestions — May 8, 2007 @ 6:55 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at

%d bloggers like this: