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

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.

HTML

              
                <h1>Use of div in dl</h1>
<p>It is <a href="https://www.w3.org/TR/html52/grouping-content.html#the-dl-element">conforming in HTML</a> to use a <code>div</code> element to group <code>dt/dd elements</code>. This can cause issues for screen readers as the pattern changes the way the semantics are represented in some browsers. The following are some test cases and below those are the rough results.</p>

<h2>case 1 <code>div</code></h2>

<dl>
	<div><dt>HTML</dt>
	<dd>HTML is the markup language used to give content structure.</dd>
  </div>
  <div>
	<dt>CSS</dt>
	<dd>CSS is the language used to add a creative layer on top of HTML.</dd>
  </div>
</dl>
<hr>
<h2>case 2 no <code>div</code></h2>
<dl>
	<dt>HTML</dt>
	<dd>HTML is the markup language used to give content structure.</dd>
	<dt>CSS</dt>
	<dd>CSS is the language used to add a creative layer on top of HTML.</dd>
</dl>
<hr> 
<h2>case 3: <code>div+role=presentation</code></h2>
<dl>
	<div role="presentation"><dt>HTML</dt>
	<dd>HTML is the markup language used to give content structure.</dd>
  </div>
  <div role="presentation">
	<dt>CSS</dt>
	<dd>CSS is the language used to add a creative layer on top of HTML.</dd>
  </div>
</dl>
<hr>
<h2 id="case4" tabindex="-1">case 4: <code>div+role=presentation+role=term+role=definition</code></h2>
<dl>
	<div role="presentation">
    <dt role="term">HTML</dt>
	<dd role="definition">HTML is the markup language used to give content structure.</dd>
  </div>
  <div role="presentation">
	<dt role="term">CSS</dt>
	<dd role="definition">CSS is the language used to add a creative layer on top of HTML.</dd>
  </div>
</dl>
<hr>
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">In theory yes, In practice does some weird stuff in &lt;dl&gt;<br>test case: <a href="https://t.co/irwHqtqSmx">https://t.co/irwHqtqSmx</a><br>✅Voiceover - Chrome/Safari<br>✅JAWS - Chrome/IE<br>✅NVDA - Chrome<br>❌NVDA/JAWS - Firefox - misreports list item count</p>&mdash; Steve Faulkner (@stevefaulkner) <a href="https://twitter.com/stevefaulkner/status/1019194419029970944?ref_src=twsrc%5Etfw">July 17, 2018</a></blockquote>

<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">case 4: div+role=presentation+role=term+role=definition fixes it NVDA/JAWS +Firefox<a href="https://t.co/sfW1GihIH3">https://t.co/sfW1GihIH3</a></p>&mdash; Steve Faulkner (@stevefaulkner) <a href="https://twitter.com/stevefaulkner/status/1019200956771291136?ref_src=twsrc%5Etfw">July 17, 2018</a></blockquote>
<blockquote class="twitter-tweet" data-conversation="none" data-lang="en"><p lang="en" dir="ltr">firefox bug filed <a href="https://t.co/bCSDVdoOir">https://t.co/bCSDVdoOir</a></p>&mdash; Steve Faulkner (@stevefaulkner) <a href="https://twitter.com/stevefaulkner/status/1019265723544297472?ref_src=twsrc%5Etfw">July 17, 2018</a></blockquote>

<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console