# footer.p vs “footer p” selector?

**URL:** https://forum.kirupa.com/t/footer-p-vs-footer-p-selector/654473
**Category:** web dev
**Created:** [November 7, 2022, 2:54am UTC](https://forum.kirupa.com/t/footer-p-vs-footer-p-selector/654473 "2022-11-07T02:54:44Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![polaryeti](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/polaryeti/32/19283_2.png) [@polaryeti](https://forum.kirupa.com/u/polaryeti)
#### Post date: [November 7, 2022, 2:54am UTC](https://forum.kirupa.com/t/footer-p-vs-footer-p-selector/654473/1 "2022-11-07T02:54:44Z")

</div>

footer.p vs “footer p” selector?

I’ve html code like this:

` <footer><p>Copyright &copy;2027 by The Code Magazine</p></footer>`

I want to select it.

```auto
CSS:
footer p{
  font-size:16px;
}

```

But footer.p isn’t working. “footer p” works though. Why is footer.p not working? I’ve seen div.p selector being used in lots of places.

**Descendant selector:**  
It selects all descendants of an ancestor. In this case, all p inside footer.

---

<div class="post-metadata">

### Author: ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)
#### Post date: [November 7, 2022, 4:17am UTC](https://forum.kirupa.com/t/footer-p-vs-footer-p-selector/654473/2 "2022-11-07T04:17:39Z")

</div>

When you have a selector like `footer.p`, what you are matching is an element that looks as follows:

```auto
<footer class="p">Blah!</footer>

```

The dot in the selector refers to a class value 🙂

---

<div class="post-metadata">

### Author: ![polaryeti](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/polaryeti/32/19283_2.png) [@polaryeti](https://forum.kirupa.com/u/polaryeti)
#### Post date: [November 7, 2022, 6:12am UTC](https://forum.kirupa.com/t/footer-p-vs-footer-p-selector/654473/3 "2022-11-07T06:12:10Z")

</div>

Thank you. I’d seen div.p somewhere and thought div.p meant selecting paragraph inside a div.
