Error in Pseudo selectors


Hi , this is a Instructions :
Add a third paragraph to the HTML document. On the CSS tab, use nth-child to give it a font size of 26px. Remember: your paragraph is the third paragraph, but the fourth CHILD of body. The h3 counts as the first child!

and this is my code :

<!DOCTYPE html>
<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
<h3 class="fancy">header</h3>
<p class="fancy">paragraph</p>
<p id="serious">paragraph2</p>


#serious{font-family:Courier; color:#8C8C8C}

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

i try it in firefox & chrom but i have same result :cry:


It should be p:nth-child(4), nth-child counts all elements, and if the 4th element is a paragraph, apply the styling between the curly brackets. A better way to explain would be to say p:first-child won't apply its styling since the first element is a h3, not a paragraph


thank you . Its run now :grinning:


why i am getting this error message?


because the paragraph with id serious has a uppercase closing tag, which means it doesn't match with the opening tag, which means the count for nth-child messed up, which means you get an error message, next time, could you copy paste your code to the forum rather then images?


now it is working..
okay next time i will copy paste my program rather than images.
thank you..!!