HTML CSS examples for CSS:Quiz
Change the color of all <p> elements, that are immediate children of <div> elements, to "red".
<!DOCTYPE html> <html> <head> <style> div > p { color: red; } </style><!--from w w w.jav a 2 s. com--> </head> <body> <div> <p>This is a paragraph inside a div element.</p> <p>This is another paragraph inside a div element.</p> <span><p>This a paragraph inside a span element, inside a div element.</p></span> </div> <p>This is a paragraph, not inside a div element.</p> <p>This is another paragraph, not inside a div element.</p> </body> </html>