Selector | Example | Example Description |
---|---|---|
.class | .intro | Selects all elements with class="intro" |
.class1.class2 | .name1.name2 | Selects all elements with both name1 and name2 set within its class attribute |
.class1 .class2 | .name1 .name2 | Selects all elements with name2 that is a descendant of an element with name1 |
#id | #firstname | Selects the element with id="firstname" |