Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


    <h1>Let's talk about the general sibling combinator or [~] in CSS.</h1>
    <p class="subheading"><a href="">MDN</a> shows the general sibling combinator has the following syntax:</p>
    <blockquote>former_element ~ target_element { style properties }</blockquote>

    <p>This element isn't styled using the general sibling combinator because it's before the "former_element".</p>
    <h2>This element is being used as the "former_element".</h2>
    <p>This element is styled using the general sibling combinator.</p>
    <h5>This element isn't styled using the general sibling combinator because it's not the specified "target_element".</h5>
    <p>But this element is. The general sibling combinator allows you to style elements which are anywhere after the "former_element" under the same parent.</p>


                h2 ~ p {
  margin: 0;
  padding: 0.5rem;
  background-color: #ffbebe;
  color: black;

h1, h2 { color: white; }

h1, p { margin: 0; }

a {
  font-weight: 900;
  color: #ffbebe;
  text-decoration-style: solid;
  transition: all ease 0.2s;

a:hover {
  color: #beecff;
  font-size: 1.2rem;
  text-decoration-style: dashed;

.subheading {
  margin: 0.5rem 0 0;

blockquote {
  margin: 0.8rem 2rem;
  padding: 0.7rem;
  border-radius: 10px;
  box-shadow: -6px 5px 0 -1px #ffbebe;
  font-weight: 100;
  transition: box-shadow ease-in-out 0.2s;

blockquote:hover {
  box-shadow: 0px 0px 0 4px #beecff;

section:first-of-type {
  margin-bottom: 2rem;

section:last-of-type {
  padding: 1rem;
  border: 4px solid #ffbebe;
  border-radius: 5px;

main {
  max-width: 55rem;
  margin: 0 auto;
  padding: 2rem;
  border-radius: 5px;
  color: #e7e7e7;
  background-color: #72274b;

body {
  margin: 0;
  padding: 1rem;
  background-color: #e7e7e7;
  font-family: Verdana, Geneva, sans-serif;