Targeting by identity

Unlike the class selector an id selector my not specify multiple targets as a comma-separated list – it must only target a single identity attribute.

#hd { color: red}
#bf { backbround: fuchsia}
#eg { backbround: yellow}
#st { backbround: lime}
#pr { backbround: aqua}
<p><span id = "hd">top burger</span>
<br>(Serves 8)</p>
<ul>
<li id = "bf">2 ld ground beef
<li id = "bf">2 eggs
<li id = "bf">1 tsp salt
<li id = "bf">1 tsp pepper
</ul>

Results of the above code:

top burger

((Serves 8)

  • 2 ld ground beef
  • 2 eggs
  • 1 tsp salt
  • 1 tsp pepper