Example if id selector

Use the ID selector (#) to select an element with a unique ID.

HTML

<div id="div1"> This is div 1  </div>
<div id="div2"> This is div 2  </div>
<div id="div3"> This is div 3  </div>

CSS

div { 
    width: 100px; 
    height: 100px; 
    background: yellow;
}

#div1 {background: red;} 
#div2 {background: green;}