Web.QHMIT
.com
Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
Run
<!DOCTYPE html> <title>Example</title> <style> h1 ~ pre { font-size: 1.4em; color: limegreen; background: beige; } </style> <article> <h1>General sibling combinator example</h1> <pre>Here's some preformatted text </pre> <aside> <pre>Here's some preformatted text </pre> </aside> <pre>Here's some preformatted text </pre> </article> <p>The first and third instances of preformatted text share the same parent (<code>article</code>) as the <code>h1</code> heading. The second instance doesn't share the same parent (its parent is the <code>aside</code> element), and therefore, the styles don't apply to it.</p>
Preview