Pen Settings

HTML

CSS

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

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

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.

HTML

              
                </div>
<div class="container outer-edge">
  <h1><strong>Artist Carl Larsson</strong></h1>
  <h2>Father of modern Swedish design</h2>
  <figure class="figcenter"> <img src="https://upload.wikimedia.org/wikipedia/commons/4/4c/Carl_Olaf_Larsson-Selbstportrait.JPG" alt="Carl Larsson Self-portrait 1906">
    <figcaption>Self-portrait, 1906</figcaption>
  </figure>
  <div>
    <p></p>
  </div>

  <h2>Some interesting facts about the artist:</h2>
  <ul>
    <li>Born in Stockholm, Sweden on 28 May 1853 to a poor family, his talent was discovered at an early age enabling him to enroll at the Art Academy and escape a life of poverty.</li>
    <li>He painted oils, watercolors and frescoes. He is best known for his watercolors of his home and family life in Sundborn, Sweden, though he personally considered his greatest work to be "Midvinterblot" (Midwinter Sacrifice), a painting commissioned
      by the Swedish National Museum in 1906.
      <li>He was one of the earliest Swedish artists to create sequential picture series, an early form of the comic strip.</li>
      <li>Through his paintings and books, his family and house became one of the most famous artist's residences in the world.</li>
      <li>His wife Karin was a textile- and interior designer. They decorated their home together. Carl's watercolors of their home had a profound influence on Swedish interior design which can still be seen today in, for example, the design ethos of global
        giant Ikea.</li>
  </ul>

  <h2>Read more about <a href="https://en.wikipedia.org/wiki/Carl_Larsson">Carl Larsson</a> at Wikipedia</h2>

</div>
              
            
!

CSS

              
                h1 {
  font-family: 'Merienda', cursive;
  text-align: center;
}

.blue-border {
  border-color: blue;
  border-width: 3px;
  border-style: solid;
}

figcaption {
  font-family: 'Merienda', cursive;
  text-align: center;
}
p, li, h2 {
  font-family: 'Open Sans', sans-serif;
  text-align: center;
  margin: 10px;
}
.figcenter {
  display: block;
  margin: auto;
  max-width: 100%;
  height: auto;
  text-align: center;
}
.outer-edge {
  margin: 5%;
  border: 2px dotted black;
  padding: 20px;
}
.header {
  background-image: url("https://upload.wikimedia.org/wikipedia/commons/4/4c/Carl_Olaf_Larsson-Selbstportrait.JPG");
  background-position: center center;
  background-size: cover;
  height: 700px;
  width: 100%;
}

              
            
!

JS

              
                document.getElementsByTagName("h1")[0].style.fontSize = "80px";
              
            
!
999px

Console