Pseudo selectors


#1



https://www.codecademy.com/en/courses/web-beginner-en-WF0CF/4/5?curriculum_id=50579fb998b470000202dc8b


Oops, try again. Did you give your third paragraph a font-size of 26px? It looks like it's currently undefined.


p:nth-child(3) {
    font-size: 26px;
}


#2

"Remember: your paragraph is the third paragraph, but the fourth CHILD of body." :wink:


#3

if your html code is correct, the paragraph is the 4th element. nth-child count all elements, and if the 4th element is (in this case) a paragraph, apply a styling. A better way to explain this would be to say p:first-child doesn't apply its styling between the curly brackets, since the first child is a h3, not a paragraph.

If problems persist, please post your full html and css code


#4

so it keeps giving me the same error message:
Oops, try again. Did you give your third paragraph a font-size of 26px? It looks like it's currently undefined. however my coding says this, and i cant find the issue.

<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
<title>Result</title>
</head>
<body>
<!--Add your HTML below!-->
<h3 class="fancy">WUSUHH</H3>
<p class="fancy">Das slang iddek.</p>
<p id="serious">Yo mamma</p>
<p>smells like pickles.</p>
</body>
</html>

` .fancy{
font-family: cursive;
color: violet;
}

serious{

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

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


#5

a uppercase closing tag doesn't match a lowercase opening tag, make sure all html tags are lowercase