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 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.


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.


                <header>Fixed Header</header>
<div class="space">
  <p>Place focus within the first input, <kbd>Tab</kbd> down to scroll the page, then <kbd>Shift</kbd> + <kbd>Tab</kbd> back up to see that focus can never be hidden by the header.</p>
      <label for="test1">1 </label>
      <input type="text" id="test1"></p>
      <label for="test2">2 </label>
      <input type="text" id="test2"></p>
      <label for="test3">3 </label>
      <input type="text" id="test3"></p>
      <label for="test4">4 </label>
      <input type="text" id="test4"></p>
      <label for="test5">5 </label>
      <input type="text" id="test5"></p>
      <label for="test6">6 </label>
      <input type="text" id="test6"></p>
      <label for="test7">7 </label>
      <input type="text" id="test7"></p>
      <label for="test8">8 </label>
      <input type="text" id="test8"></p>
      <label for="test9">9 </label>
      <input type="text" id="test9"></p>
      <label for="test10">10 </label>
      <input type="text" id="test10"></p>
      <label for="test11">11 </label>
      <input type="text" id="test11"></p>
      <label for="test12">12 </label>
      <input type="text" id="test12"></p>

<!-- modification of a CodePen found on  posted by Lemon_Juice   SitePoint Guru 
Modified  to show accessible inputs and not use <br> -->


                header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 8ex;
  background: orange;
  text-align: center;
  font-weight: bold;
  padding-top: 2ex;
} {
  margin: 80px;

kbd {
  border-radius: 3px;
  padding: 3px;
  border: 1px solid black;



                var fixedfocus = {
  init: function (fixedElem) {
    fixedfocus.fixedElem = fixedElem;
    document.body.addEventListener("focusin", fixedfocus.adjust);

  adjust: function (e) {
    var fixedBottomPos = fixedfocus.fixedElem.getBoundingClientRect().bottom;
    var rect =;
    if ( < fixedBottomPos) {
      window.scrollBy(0, - fixedBottomPos);

document.addEventListener("DOMContentLoaded", function () {