Pseudo selectors 23


#1

<!DOCTYPE html>
<html>
    <head>
        <link type="text/css" rel="stylesheet" href="stylesheet.css"/>
        <title>Result</title>
    </head>
    <body>
        <h3 class="fancy">Chicken</h3>
        <p class="fancy">Pig</p>
        <p id="serious">Horse</p>
        <p>Cow</p>
    </body>
</html>

/*Add your CSS below!*/
.fancy {
font-family:cursive;
color:violet;
}

serious {

font-family:Courier;
color:#8c8c8c;

}
body:nth-child(4) {
font-size:26px;
}

it says my font size is 16 when it is clearly 26. I have tried changing my browser window but nothing has worked so far.


#2

you need a space between body and :nth-child(4), to select the 4th element inside body. Without this space, it checks if the 4th element is a body (it is not, it is a paragraph), and if it is a body, apply the styling between the curly brackets.

for next time, use one of the two following options to make your code/indent is visible:

select your code and press ctrl + shift + c (or cmd + shift + c if you use a mac)

if this instructions are unclear, you can also insert 3 backticks before and after your code, like so:

```
<p>visible</p>
```

the backtick is located above the tab key on your keyboard


#3

this worked, thank you!