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>Inline Radio Buttons</h1>
<p>Semantic and Accessible</p>
  <input id="item-1" class="radio-inline__input" type="radio" name="accessible-radio" value="item-1" checked="checked"/>
  <label class="radio-inline__label" for="item-1">
      Item 1
  <input id="item-2" class="radio-inline__input" type="radio" name="accessible-radio" value="item-2"/>
  <label class="radio-inline__label" for="item-2">
      Item 2
  <input id="item-3" class="radio-inline__input" type="radio" name="accessible-radio" value="item-3"/>
  <label class="radio-inline__label" for="item-3">
      Item 3


                @import url(;

body {
  font-family: 'Open Sans', helvetica, arial, sans-serif;
  max-width: 305px;
  margin: 3rem auto 0;
  line-height: 1.6;
  color: #444;

fieldset {
  border: none;
  padding: 0;
  margin: 0;
  text-align: center;

h1 {
  margin: 0;
  line-height: 1.2;

p {
  margin: 0 0 1.6rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid #ddd;

.radio-inline__input {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;

.radio-inline__label {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin-right: 18px;
    border-radius: 3px;
    transition: all .2s;

.radio-inline__input:checked + .radio-inline__label {
    background: #B54A4A;
    color: #fff;
    text-shadow: 0 0 1px rgba(0,0,0,.7);

.radio-inline__input:focus + .radio-inline__label {
    outline-color: #4D90FE;
    outline-offset: -2px;
    outline-style: auto;
    outline-width: 5px;


Radio buttons are hard to style in polished ways while still retaining their accessibility features.

You can tell when these radio buttons have focus. Use the up/down/right/left keyboard arrows to navigate between them after. 

If you can't tell which one has focus or if you're focused on that element at all, then it's not accessible. In general, try not to rely on JS to make things accessible. Semantic HTML is pretty dang accessible already.