---
title: "Comment by Jesper Hasselquist on \"Why CSS :focus-within is amazing\" | Hashnode"
description: "Really nice article on the :focus-within pseudo-class! Really good use of it! 🥳 I would just like to make a few clarifications, if you don&#39;t mind. ::before"
url: "https://hashnode.com/posts/why-css-focus-within-is-amazing/5faa199c04e4a94a40f0d653/comment/5faa92ac1ef56b5545aafb4d"
---

[Discussion](https://hashnode.com/posts/why-css-focus-within-is-amazing/5faa199c04e4a94a40f0d653)

Comment [Why CSS :focus-within is amazing](https://hashnode.com/posts/why-css-focus-within-is-amazing/5faa199c04e4a94a40f0d653)

[Jesper Hasselquist](https://hashnode.com/@Joxtacy)

[Nov 10, 2020](https://hashnode.com/posts/why-css-focus-within-is-amazing/5faa199c04e4a94a40f0d653/comment/5faa92ac1ef56b5545aafb4d)

Really nice article on the `:focus-within` pseudo-class! Really good use of it! 🥳 I would just like to make a few clarifications, if you don't mind.

`::before` and `::after` are [pseudo-elements](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements) and not pseudo-selectors. And technically `:focus-within` is referred to as a [pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes). Pseudo-elements should generally be used with double `::` to tell them apart from pseudo-classes which should be referred to with a single `:`. They are all used together in [CSS selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors).

[Chris Bongers](https://hashnode.com/@dailydevtips)

[Nov 10, 2020](https://hashnode.com/posts/why-css-focus-within-is-amazing/5faa199c04e4a94a40f0d653/comment/5faa92ac1ef56b5545aafb4d#reply-5faaaecec9b29b563d0c1098)

Hey Jasper, nice addition you are absolutely right on that actually!
