0

Uses of Id and class attributes in CSS. Difference also

What is the difference between Id and class attribute in CSS .define them ..pls

7th Jun 2021, 6:37 AM
Arnav..
Arnav.. - avatar
3 Réponses
+ 3
Hi Arnav Shan They are essitential the same but id is used when one element is supposed to have the styling while class is any. They can be interchanged but that is not good practise
7th Jun 2021, 6:49 AM
Ollie Q
Ollie Q - avatar
+ 4
It is recommended of us to search the forum before posting a question. Next time please, use the search facility first, you are welcome to post IF none of the previous discussion found in search addressed your query. https://www.sololearn.com/Discuss/591088/?ref=app https://www.sololearn.com/Discuss/358357/?ref=app https://www.sololearn.com/Discuss/1731925/?ref=app https://www.sololearn.com/Discuss/1287039/?ref=app https://www.sololearn.com/Discuss/1461962/?ref=app https://www.sololearn.com/Discuss/779243/?ref=app
7th Jun 2021, 7:04 AM
Ipang