Subject: ID Selector
Author: CyberSpider
In response to: Class Selector
Posted on: 04/12/2016 05:59:55 AM
While Class selector targets all elements of the same class, ID selector preceded by '#' focuses on finding a specific element with the unique identifier.
#first {
color: red;
text-decoration: line-through;
}
Try it yourself in sandbox »
>
> On 04/12/2016 05:41:22 AM
CyberSpider wrote:
Class selector preceded by '.' is used to find all elements of the same class.
.blue_underline {
color: blue;
text-decoration: underline;
}
Try it yourself in sandbox »
References: