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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain caching in html5 and html?

506


How many tags are defined in xhtml 1.0?

498


Explain list elements in html.

504


Why to use
tags in html?

483


What is semantic HTML?

502






How do you refer to the .css file in the web page?

511


What is the role of html?

450


What does tagging someone mean?

457


What is single tag?

476


Why is frameset not supported html5?

453


What are deprecated html elements?

505


What is canvas in html5? How to write a canvas?

473


what is xhtml? Why is xhtml needed?

490


What is dom and how it works?

418


What is the Application Cache in HTML5 and why it is used?

485