#chapter { /* Selects the element with id="chapter" */
    background-color: darkblue;
    color: white;
}
<p id="chapter">The id value is "chapter".</p>
<p>This is just a paragraph element.</p>
Rendered Output
#id_value {
    /* ... */
}
[id="id_value"] {
    /* ... */
}
#chapter { /* The specificity value: 0, 1, 0, 0 */
    background-color: orange; /* This style is applied. */
}
[id="chapter"] { /* The specificity value: 0, 0, 1, 0 */
    background-color: green;
}
<p id="chapter">The id value is "chapter".</p>
Rendered Output