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

What is the purpose of Socket.bufferedAmount atribute of WebSocket?

507


What is tag in ela?

465


Why we use xhtml instead of html?

423


Explain the key differences between localstorage and sessionstorage objects.

437


What is an alt tag for an image?

423






How do I make a picture into a link?

448


Why do we need br?

425


What is picture tag in html?

447


What is semantic HTML?

492


What is the correct html for creating a hyperlink with title?

851


Describe the difference between cookies, sessionStorage, and localStorage.

466


How do I do multiple colors of text?

519


What does br mean in html?

487


Why to use figcaption tag in html5?

467


What is xhtml modularization? Why xhtml modularization?

486