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

              
                <!-- Ce Codepen a été créé pour illustrer l'article Concevoir des formulaires accessibles – Le contrôle de saisie publié sur le blog de Tanaguru : https://www.tanaguru.com/concevoir-des-formulaires-accessibles-le-controle-de-saisie -->

<h2>1.2 – Indiquer le caractère obligatoire du champ hors de son étiquette</h2>

<h3>1.2.1 – Identifier nommément les champs, version HTML</h3>

<p id="required-fields-info">Les champs Nom et Adresse email sont obligatoires.</p>

<label for="first-name">Prénom</label>
<input id="first-name" type="text" name="first-name" autocomplete="given-name">

<label for="last-name">Nom</label>
<input id="last-name" type="text" name="last-name" autocomplete="family-name">

<label for="email">Adresse email</label>
<input id="email" type="email" name="email" autocomplete="email">

<h3>1. 2.2 – Relier le passage de texte via un attribut WAI-ARIA, version HTML</h3>

<label for="first-name">Prénom</label>
<input id="first-name" type="text" name="first-name" autocomplete="given-name">

<label for="last-name">Nom</label>
<input id="last-name" type="text" name="last-name" autocomplete="family-name" aria-describedby="required-fields-nom">
<p class="required-info" id="required-fields-nom">Ce champ est obligatoire.</p>

<label for="email">Adresse email</label>
<input id="email" type="email" name="email" autocomplete="email" aria-describedby="required-fields-email">
<p class="required-info" id="required-fields-email">Ce champ est obligatoire.</p>
              
            
!

CSS

              
                h3 {
  margin-top: 3rem;
}

label,
input { 
  display : block; 
}

label {
  margin-top : 1.5rem;
}

.required-info {
  margin : 0.5rem 0 1.5rem;
}
              
            
!

JS

              
                
              
            
!
999px

Console