Specified question 5 for HTML in questionw

This commit is contained in:
h7x4 2020-09-02 15:50:57 +02:00
parent 700f1d9701
commit 1514d33f1c
1 changed files with 12 additions and 2 deletions

View File

@ -22,8 +22,18 @@
## 5. What CSS selector matches all the p elements inside the article element in the following HTML?
```HTML
Here, we have two options. One could either do
```CSS
article p {}
```
This specifies all `<p>` elements inside the `<article>`, in contrast to `article > p {}` which would only specify `<p>` elements directly beneath the `<article>`.
which specifies all `<p>` elements inside the `<article>`.
The other options would be
```CSS
article > p {}
```
which would only specify `<p>` elements directly beneath the `<article>`. But since there are no `<p>` subchildren, both will work.