Pen Settings



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


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.


                <div id="wrapper">
  <div class="text">
    <h1>Eltern von Elementen mit Fokus hervorheben</h1>
<p>Dieses Beispiel zeigt die Pseudoklasse <em>:focus-within</em> in der Praxis. Siehe den dazugehörigen Artikel bei den <a href="">Webkrauts</a>. Dieser Text wird in den Hintergrund treten, sobald das Formular verwendet wird.</p></div>
<form action="#">
    <h2>Das Formular</h2>
    <label id="name-label" for="name">Dein Name</label>
      <input id="name" name="name" type="text"   />

    <label id="email-label" for="email">
      Deine E-Mail
      <input id="email" name="email" type="email"   /> 
    <label id="label-message" for="message">
      Deine Nachricht

      <textarea id="message" name="message" rows="8" cols="48"></textarea>

        <input id="submit" type="submit" value="Senden">



body {
  background: #dddddd url(;

h1, h2 {
  margin-top: 0;

  background: white;
  width: 80%;
  max-width: 600px;
  margin: 20px auto;
  padding: 30px;

#wrapper:focus-within .text {
  opacity: 0.3;

#wrapper form {
  padding: 20px;
  margin-top: 20px;

#wrapper:focus-within form {
  background: #eee;

form fieldset {
  padding: 20px;
  border: 3px solid transparent;

form fieldset:focus-within {
  background: #FFF;

form label {
  display: block;
  margin-bottom: 5px;

form input, form textarea {
  width: calc(100% - 20px);
  margin-bottom: 20px;
  border: 1px solid #AAA;
  padding: 10px;

form input:focus, form textarea:focus {
  border: 3px solid #333;
  padding: 8px;

#submit {
  width: auto;
  margin: 20px 0 0 23px;

#submit:hover, #submit:focus {
  background-color: #333;
  color: #FFF;