Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <span id="desc-prefix" aria-hidden>Aria describedby begin - </span>
<span id="desc-2" aria-hidden>Image 2</span>
<span id="desc-5" aria-hidden>Image 5</span>
<span id="desc-post" aria-hidden>- Aria describedby end</span>
<span id="desc-fail" aria-hidden>Desc shown 1</span>
<!-- NOTHING -->
<img src="bird.jpg" alt="Alt text shown 1" tabindex="-1" aria-label="Aria label shown 1" aria-describedby="desc-fail" title="Title shown 1">
<br>
<!-- ALL THE THINGS -->
<figure tabindex="-1">
  <picture>
    <source srcset="https://chrislachance.com/dev/pic-srcset/bird_2000.webp" media="(min-width: 2000px)" type="image/webp">
    <source srcset="https://chrislachance.com/dev/pic-srcset/bird_1500.webp, https://chrislachance.com/dev/pic-srcset/bird_2000.webp 1.5x" media="(min-width: 1500px)" type="image/webp">
    <source srcset="https://chrislachance.com/dev/pic-srcset/bird_1000.webp, https://chrislachance.com/dev/pic-srcset/bird_1500.webp 1.5x, https://chrislachance.com/dev/pic-srcset/bird_2000.webp 2x" media="(min-width: 1000px)" type="image/webp">
    <source srcset="https://chrislachance.com/dev/pic-srcset/bird_500.webp, https://chrislachance.com/dev/pic-srcset/bird_1000.webp 1.5x, https://chrislachance.com/dev/pic-srcset/bird_1500.webp 3x,
https://chrislachance.com/dev/pic-srcset/bird_2000.webp 4x" media="(min-width: 500px)" type="image/webp">
    <img src="https://chrislachance.com/dev/pic-srcset/bird_low-data.jpg" alt="Alt text of the image 2" aria-label="Label of image 2" title="Title of image 2" aria-describedby="desc-prefix desc-2 desc-post"/>
  </picture>
  <figcaption>Caption of the image 2</figcaption>
</figure>
<!-- NO ARIA LABEL or DESCRIBEDBY -->
<figure tabindex="-1">
  <picture>
    <img src="https://chrislachance.com/dev/pic-srcset/bird_low-data.jpg" alt="Alt text of the image 3" title="Title of image 3"/>
  </picture>
  <figcaption>Caption of the image 3</figcaption>
</figure>
<!-- JUST ARIA LABEL, NO DESCRIBEDBY -->
<img src="https://chrislachance.com/dev/pic-srcset/bird_low-data.jpg" aria-label="Label of image 4" alt="Alt text of the image 4" title="Title of image 4" tabindex="-1"/>
<!-- JUST ARIA DESCRIBEDBY, no LABEL -->
<img src="https://chrislachance.com/dev/pic-srcset/bird_low-data.jpg" aria-describedby="desc-prefix desc-5 desc-post" alt="Alt text of the image 5" title="Title of image 5" tabindex="-1"/>
<!-- JUST CAPTION -->
<figure tabindex="-1">
  <picture>
    <img src="https://chrislachance.com/dev/pic-srcset/bird_low-data.jpg" alt=""/>
  </picture>
  <figcaption>Caption of the image 6</figcaption>
</figure>
              
            
!

CSS

              
                :root{
  margin:2em;
}
img{
  max-width:100%;
  max-height:90vh;
}
[aria-hidden]{display:none}
figure,picture,source,img{
  display:inline;
  box-sizing:border-box;
  margin:0;
  padding:0;
}
img{border:1px solid #aaa;margin:0 0 2em;}
body>*{float:left;margin-right:2ch;}
              
            
!

JS

              
                
              
            
!
999px

Console