- The element selector (uses an HTML element as target):
<h1>This is an HTML header</h1>
/* Element selector */
h1 {
color: green;
}
- The id selector (uses an HTML id as target):
<h1 id="header-1">This is an HTML header</h1>
/* ID selector */
#header-1 {
color: green;
}
- The class selector (uses an HTML class as target):
<h1 class="headers">This is an HTML header</h1>
/* Class selector */
.headers {
color: green;
}