What is the difference between the CLASS and ID when you are
writting CSS?

Answers were Sorted based on User's Feedback



What is the difference between the CLASS and ID when you are writting CSS?..

Answer / yathindra

In CSS we can call id with '#' and can be used only one time
for one page. When coming to the case of class in CSS it can
be used infinite number of times in the same page as well as
in the whole site.

Is This Answer Correct ?    10 Yes 0 No

What is the difference between the CLASS and ID when you are writting CSS?..

Answer / suji

ID uniquely identifies an element within a document where
CLASS attribute specifies an element to be a member of one
or more classes. Unlike with the ID attribute, any number of
elements can share the same class. CLASS attribute can be
used to impose a certain pattern in the webpage, like the
page's header, footer,etc. which will enhance uniformity
among all webpage of a website.

Is This Answer Correct ?    10 Yes 1 No

What is the difference between the CLASS and ID when you are writting CSS?..

Answer / rojythakur.learningpp@gmail.co

# for id and . for class.
id used only one time bt not class.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More HTML DHTML Interview Questions

What are the new APIs provided by the HTML 5 standard?

0 Answers   SwanSoft Technologies,


How to create shapes with border property.

0 Answers  


What is doctype good for?

0 Answers  


What is a meta title?

0 Answers  


Do all HTML tags come in pair?

0 Answers  






how can we convert html server controls to webserver controls?

0 Answers   EDS,


Where does nav go in html?

0 Answers  


Which html tag allows users to specify a file for uploading?

0 Answers  


Explain new form elements in html5.

0 Answers  


Is html worth learning?

0 Answers  


What is the form tag?

0 Answers  


Can you explain what the use of canvas element in html5?

0 Answers  


Categories