<div data-height="265" data-theme-id="light" data-default-tab="html,result" data-prefill='{"tags":[],"scripts":[],"stylesheets":[]}'>

  <pre data-lang="html">&lt;h1>Hello from HTML&lt;/h1></pre>
  <pre data-lang="css">html {
  background: black;
  color: white;
  text-align: center;

h1::after {
  content: " / CSS!";
  <pre data-lang="js">document.querySelector("h1").innerText += " / JavaScript";
<script async src="https://static.codepen.io/assets/embed/ei.js"></script>
[data-prefill] pre {
  display: block;
  padding: 1em;
  margin: 1em auto;
  background: #eee;
  border-radius: 0.5em;
  max-width: 30em;
  white-space: pre-wrap;
  box-shadow: inset 2px 2px 3px #ccc;

.prefill-click-to-run {
  border-radius: 0.5em;
  appearance: none;
  background: none;
  padding: 0.5em 1em;
  border: solid 1px;
  font: inherit;
  color: inherit;
  display: inline-block;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
View Compiled
Array.from(document.querySelectorAll("[data-prefill]"), (el) => {
  // Create a Click to Run button
  const button = document.createElement("button");
  button.innerHTML = "Click to Run";
  button.setAttribute("class", "prefill-click-to-run");

  // On click, the element will become the embed!
  button.addEventListener("click", () => {
    el.classList.add("codepen"); // Add the codepen class back.
    window.__CPEmbed(); // Trigger the CodePen embed script to run again.

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.