Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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.


Auto Save

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 class="heading"><a href="" target='_blank'>Understanding Basic CSS Selectors</a></h1>
<h2>This is a level 2 heading</h2>
<h3>A level 3 heading</h3>
<p class="para">Lorem ipsum dolor sit amet consectetur adipisicing elit. Libero quis neque, quibusdam eaque dolor fugit distinctio a incidunt doloribus excepturi repellendus tenetur. Praesentium sit esse saepe dolor enim, possimus quibusdam?</p>

<h2 id="sub-heading">A sub-title for selectors example</h2>

<p id="secondPara" class="para">Lorem ipsum dolor sit amet consectetur adipisicing elit. Reiciendis laboriosam nisi dolorem a excepturi architecto dicta possimus. Ullam reprehenderit inventore quisquam sunt impedit non. Perferendis alias corporis voluptatem harum dignissimos.</p>


                /* Universal Selectors */
* {
  padding: 0;
  margin: 0;

  background-color: #E5F3FA;
  width: 80%;
  margin: 0 auto;
  margin-top: 30px;

/*Selector list */
h2, h3{
  color: green;

/* Tag selector */
h1 {
  text-align: center;
  margin-bottom: 10px;

  text-decoration: none;

/* ID Selector */
  font-size: 18px;
  margin-bottom: 5px;
  padding: 5px;

/* Class selector  */
  font-size: 18px;
  color: #1E47FA;

/*Pseudo-class using the :hover */
color: #6893F7;

/*Pseudo-element selector */
p:first-line {
color: blue;
text-transform: capitalize;