There are, at my last count, 11 different uses of id attributes in HTML, only one of which is their use in CSS selectors. The other 10 require the id to identify a single element within the document.
For CSS selectors, omitting using id selectors when appropriate to do so, means missing out on some of the power that specificity brings to you.
There are, at my last count, 11 different uses of id attributes in HTML, only one of which is their use in CSS selectors. The other 10 require the id to identify a single element within the document.
For CSS selectors, omitting using id selectors when appropriate to do so, means missing out on some of the power that specificity brings to you.
Examples please
document.getElementById
to name a few