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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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="wichtig">
		<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias quas tenetur necessitatibus animi illo…</p>

	<button id="meinKnopf">Klasse ändern</button>


                * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
main {
  width: 80%;
  margin: 3em auto 0 auto;
#wichtig {
  margin: 1.5em 0;
  transition: all 0.3s ease-in-out;
footer {
  width: 80%;
  margin: 1.5em auto;
button {
  font-size: 100%;
  line-height: 1;
  padding: 1em;
  text-align: center;
  background-color: #357;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
diese Klasse ist nicht im HTML-Code enthalten!
sie wird via Javascript bei "div#wichtig" hinzugefügt und wieder entfernt 
– also "getoggelt"
.betont {
  font-size: 150%;
  padding: 2rem;
  border-radius: 10px;
  background-color: #ffea9a;
  transform: rotate(360deg) skewX(10deg) skewY(10deg);


                function klassenToggle(element, klasse) {
  const ele = document.querySelector(element);

function klickKlasseEinAus(ausloeser, element, klasse) {
  document.querySelector(ausloeser).addEventListener("click", function() {
    klassenToggle(element, klasse);

// Ihr müsst nur das anpassen und oben aufgeführten Code 1:1 übernehmen!
// Aufruf: klickKlasseEinAus(auslösendesElement, betroffenesElement, KlassenName);
klickKlasseEinAus("#meinKnopf", "#wichtig", "betont");