HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <style> h2 ~ p{ color: red; } </style> </head> <body> <h1>CSS element ~ element Selector</h1> <h2>This is h2</h2> <p>I'm red</p> <p>I'm red</p> <h3>This is h3</h3> <p>I'm red</p> <p>I'm red</p> <p><strong>Note</strong>: In this example, all paragraph after h2 will be red.</p> </body> </html>
OUTPUT
×

Save as Private