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>Titre</h1>

<nav>
  <h2>Sommaire</h2>
  <ul>
    <li><a href="#anchor-titreA">Titre A</a></li>
    <li><a href="#anchor-titreB">Titre B</a></li>
  </ul>
</nav>

<h2 id="anchor-titreA">Titre A</h2>
<p>
  Lorem, ipsum dolor sit amet consectetur adipisicing elit. Facere consequuntur voluptatibus et placeat fuga numquam perferendis asperiores eum modi maxime dignissimos mollitia ducimus, qui ea veritatis blanditiis reiciendis, molestias architecto.
</p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Itaque natus deleniti, quibusdam fuga, eaque cupiditate repellat magnam nemo quasi odio ut ullam. Dolorem ab quos veritatis enim expedita repudiandae omnis!</p>

<div class="img-and-caption">
  <a href="http://via.placeholder.com/640x360"><img src="http://via.placeholder.com/640x360"></a>
  <p class="caption">Lorem ipsum dolor sit amet consectetur, adipisicing elit. Nobis molestias, eaque exercitationem cumque repellat voluptatibus doloribus nulla magnam commodi? Voluptatum doloribus est eos sunt voluptate. Numquam nam itaque molestias qui?</p>
  
</div>

<p>
  Lorem ipsum dolor sit, amet consectetur adipisicing elit. Aspernatur, placeat. Ab laborum vero beatae iste veritatis nobis aliquid maiores harum amet, ea recusandae, libero ad nihil? Necessitatibus quia quasi deleniti.
</p>

<h2 id="anchor-titreB">Titre B</h2>

<p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Temporibus doloribus laudantium deserunt dolorum optio sed aspernatur, aut ipsum animi repellendus, est, modi placeat assumenda. Deleniti ex deserunt facere beatae sint.</p>

<table>
  <tr>
    <th>Nom</th>
    <th>Prénom</th>
    <th>Adresse</th>
  </tr>
  
  <tr>
    <td>Doe</td>
    <td>John</td>
    <td>3, impasse de Blanc manteaux</td>
  </tr>
  
  <tr>
    <td>Stark</td>
    <td>Philippe</td>
    <td>9, avenue du Ggal de Gaule</td>
  </tr>

  <tr>
    <td>Jolie</td>
    <td>Sylvie</td>
    <td>19, rue du Pape</td>
  </tr>
</table>

<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Iure, molestias ducimus sequi doloribus beatae, ex mollitia magni fugit obcaecati recusandae pariatur illum blanditiis necessitatibus non officia laudantium quibusdam provident tenetur.</p>
              
            
!

CSS

              
                body {
  font-family:'Ubuntu', Arial, sans-serif;
  font-weight:300;
  
  background:#efefef;
  margin:5em;
}

img {max-width:100%;}

h1, h2 {font-weight:300;}

h1 {text-align:center; font-size:500%;}

h2 {font-size:200%}

.img-and-caption {
  background:white;
  padding:1em; margin-top:2em;margin-bottom:2em;
  
  width:80%;
  margin-left:auto;margin-right:auto;
}

 .img-and-caption img {width:100%;}
.img-and-caption .caption {
  font-size:80%;
  color:rgba(0,0,0,.5);
}

table {
  width:100%; border-collapse:collapse;
  background:white;
}
th {
  text-align:left;
  border-bottom:2px solid;
}

th,
td {padding:.5em 1em;}
              
            
!

JS

              
                document.oncontextmenu = new Function("return false;");
              
            
!
999px

Console