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 is required to process package imports. If you need a different preprocessor remove all packages first.

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


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.


                <!-- Unsemantic, inaccessible button -->
<span class="btn btn--blue" onclick="alert('This is an inaccessible span masquerading as a button!')">Click me!</span>

<!-- Unsemantic, but screen reader accessible button -->
<span class="btn btn--red" tabindex="0" role="button" onclick="alert('This is a span made accessible to a screen reader but still doesn\'t work with a keyboard!')">Click me!</span>

<!-- Unsemantic, but screen reader/keyboard accessible button -->
<span class="btn btn--purple" tabindex="0" role="button" onclick="alert('Ugh this works but it is a terrible solution!')" onkeypress="alert('Ugh this works but it is a terrible solution!')">Click me!</span>

<!-- Classic semantic button -->
<button class="btn btn--green" onclick="alert('This is a proper button with default focus style.')">Click me!</button>



                body {
  font-size: 112.5%;

.btn {
  display: inline-block;
  border: .1rem outset;
  font-family: 'Rubik', sans-serif;
  font-size: 1.3rem;
  font-weight: normal;
  margin: 3rem;
  padding: .5rem 1rem;
  background: white;

.btn--green {
  color: #181;
  border-color: #181;

.btn--green:focus {
  background-color: #efe;

.btn--red {
  color: #922;
  border-color: #922;

.btn--red:focus {
  background-color: #fee;

.btn--blue {
  color: #229;
  border-color: #229;

.btn--blue:hover {
  background-color: #eef;

.btn--purple {
  color: rebeccapurple;
  border-color: rebeccapurple;

.btn--purple:focus      {
  background-color: #edf;

*:focus {
   outline: .15rem dashed hotpink;
  outline-offset: .2rem;

/* the below code is an override for default firefox button outline style */

button::-moz-focus-inner {
  border: 0;