Pen Settings

HTML

CSS

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

JavaScript

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

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

              
                <div class="container">
  <h1>Accessible Headings Example</h1>
    <div class="row">
      <div id="A11yBad" class="col-md-5 mb-3 border border-danger">
        <i class="fa fa-thumbs-down fa-3x"></i>
        <div class="h3">Non-Semantic heading</div>
        <p>The section heading has been styled to visually look like a heading, styled with a larger, heavier typeface using Cascading Style Sheets (CSS). As there are no heading semantics, the "heading" text lacks meaning.</p>
        <div class="h5">Drawbacks to using non-semantic headings</div>
        <ul>
          <li>Text does not provide appropriate meaning about the document, or the section of the document.</li>
          <li>These headings cannot be used by assistive technology, such as screen readers to navigate sections of the page.</li>
        </ul>
      </div>
      <div id="A11yGood" class="col-md-5 mb-3 offset-md-1 border border-success">
        <i class="fa fa-thumbs-up fa-3x"></i>
        <h2 class="h3">Semantic heading</h2>
        <p>The section heading has been marked up semantically, using the HTML <code>&lt;h2&gt;</code> heading level element. You can style headings as you wish. This element marks this text as a heading one level below the prior parent level.</p>
        <h3 class="h5">Benefits to using semantic headings</h3>
        <ul>
          <li>As a semantic heading, the heading text provides information about the grouping of content that follows the heading.</li>
          <li>Semantic headings can be navigated via special screen reader commands:
            <ul>
              <li><strong>JAWS</strong> & <strong>NVDA:</strong> <kbd>H</kbd> to navigate headings; <kbd>Insert</kbd>+<kbd>F6</kbd> list of all headings; <kbd>1</kbd>-<kbd>6</kbd> next heading of level</li>
              <li><strong>Narrator:</strong> <kbd>H</kbd> to navigate headings</li>
              <li><strong>VoiceOver:</strong> <kbd>VO</kbd>+<kbd>Command</kbd>+<kbd>H</kbd> </li>
            </ul>
          </li>
        </ul>
      </div>
    </div>
</div>

              
            
!

CSS

              
                #A11yBad i{
  position:absolute;
  top:0;
  right:0;
  -webkit-transform: scaleX(-1);
  transform: scaleX(-1);
  color:#BC2E3B;
}
#A11yGood i{
  position:absolute;
  top:0;
  right:0;
  -webkit-transform: scaleX(-1);
  transform: scaleX(-1);
  color:#1E7E34;
}
#A11yGood h2:before{
  font-family: "Font Awesome";
  font-size:200%;
  /*content:'\f087';*/
  position:absolute;
  top:-10px;
  right:-4px;
}
              
            
!

JS

              
                
              
            
!
999px

Console