Example: Selectors
This example shows all three types of selectorsA way of specifying to which parts of a document the declarations in a rule apply.. All paragraphs are in italics, the paragraphs in the class odd
are blue, and the paragraph with ID special
is red.
Note:
Hints:
- undefined
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
<!DOCTYPE html>
<html lang="en">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
#special {
color: red;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX