selector {
property: value;
property: value;
}
The selector is used to select which elements in the HTML page will be given the styles inside the curly braces.
p {
property: value;
}
Selects all paragraph elements.
img {
property: value;
}
Selects all image elements.
The color property changes the color of the text.
p {
color: red;
}
body {
background-color: hotpink;
}
The background-color property changes the color of the background.