0

What is mean by working with id

19th Apr 2018, 8:54 AM
sandip
4 Answers
+ 1
Id is the identity of an element. Elements can be selected by its id. <div id='test' > </div> Above div element can be selected in css like: #test { } Thus any element in html is selected by its unique id.
19th Apr 2018, 9:10 AM
Souvik
Souvik - avatar
+ 1
well the div has an id of test. So the css selector for that is #test That means it will find whatever element has the id test. if you had a class="test" the selector would be .test instead of #test You can have multiple elements with the same class but only one element per id. That means on that page there can be no other element with the id of test. But you could have 13 paragraphs all with the class="bigParagraph" and the one css style .bigParagraph would apply to all of them.
19th Apr 2018, 9:17 AM
Adam
Adam - avatar
0
What is the context of the sentence?
19th Apr 2018, 9:02 AM
Adam
Adam - avatar
0
simple... ids are unique you can use one id only once but if you want to use multiple time then you need to work with the class
19th Apr 2018, 10:31 AM
rohit
rohit - avatar