0
.hotdog p.mustard {
  background: yellow;
}

I'm talking about the dot between p and mustard

2 Answers2

2

That's the class selector, it selects each p element with the class mustard. In this case it will only select those if they are a descendant of an element with the hotdog class.

Jan Wilts
  • 82
  • 1
  • 7
-1

.hotdog {
  background: orange;
  padding: 10px;
}
.hotdog.chilli {
  background: brown;
}
.hotdog .ketchup {
  background: red;
}
.hotdog p.mustard {
  background: yellow;
}
<div class="hotdog">
  hot diggidy dog
  <p class="ketchup">ketchup</p>
  <p class="mustard">mustard</p>
</div>

<div class="hotdog chilli">
  chilli dog??
</div>
davidchoo12
  • 1,261
  • 15
  • 26