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>1) Un titre, taille de base définie en unité relative</h1>
<p>Ce texte est normal.</p>
<p class="nodesktop">Texte mobile : (500px sur une taille de base de font à 16px, à 1000px sur une taille de font à 32px, sur Firefox et Safari desktop)<br>
(800px sur une taille de base de font à 16px, à 1600px sur une taille de font à 32px, sur Chrome et Edge)</p>
<p>La MQ en REM se base sur le font-size root, et donc : 50*10 = 500px pour le mobile.</p>
              
            
!

CSS

              
                html { 
  font-size: 62.5%;
}
body {
  background: #fff;
  color: #333;
  font-family: Arial, sans-serif;
  font-size: 1.6rem; /* taille de base équiv à 16px */
  line-height: 1.5; /* à corriger si besoin est */
} 

h1,
.h1 {
  display: block;
  font-size: 3.2rem; /* equiv 32px */
}

.nodesktop {
  display: none;
}

@media (max-width: 50rem) { /* equiv 800px */
  .nodesktop {
    display: block;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console