23. pseudo selector


#1

".fancy{
font-family : cursive;
color:violet;
}
serious{
font-family:Courier;
color:#8C8C8C;
}
h3:nth-child(3){
font-size:26px;
}"

still not working, help me!


Having an issue with this pseudo Selector
#2

uhm.. your paragraphs should be after your h3 heading:

<h3>heading</h3>
<!-- three paragraphs here -->

then should select the 4th elements inside body (body :nth-child(4)) or the 4th element which is a paragraph (p:nth-child(4)). notice the space between the css selector and :nth-child when selecting the element nested inside body, or the 4th element which is a paragraph


#3
<body>
	<!--Add your HTML below!-->
	<h3 class="fancy">
	    <p class = "fancy">Priyanka </p>
	    <p id="serious">This is fun </p>
	    <p>yo</p>
	</h3>
</body>

third paragraph is under H3 heading, still nesting is not done.


#4

no, you nested the paragraphs inside the heading, the paragraphs should be after your heading:

<h3>heading</h3>
<p>first pragraph</p>
<!-- other two paragraphs -->

nesting paragraphs inside headings (and vice versa) is bad practice, headings and paragraphs are not designed to hold other block level elements (paragraphs and headings are both block level elements)


#5

Thanks :slight_smile: it worked!!!