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.


                <script src="//"></script>
<div id="wrapper">
<h1>Matsumoto Castle</h1>
<div id="intro">
  <p>One of Japan’s major historical castles, built in 1504, and today listed as a National Treasure. Locally known as the Crow Castle for its black exterior. Remained in constant use until 1868, restored in the late 19<sup>th</sup> and early-to-mid 20<sup>th</sup> centuries. 

<div role="supplementary">
    <svg version="1.1" xmlns="" viewBox="0 0 220.2 215">
<polygon points="109.7,215 220.2,139.3 175,108.7 196.4,89.1 156.4,60.4 175.4,43 110,0 44.8,43.3 64.6,60.7 
23.8,89.4 47,109 0,139.6 "/>
    <figcaption>Sigil <i>(mon)</i> of the Ogasawara clan,  original builders of Matsumoto Castle.</figcaption>
    <dd>Nagano, Japan
    <dd>8:30 – 4:30


                * { box-sizing: border-box; } 
html { 
  background: url(, #000;
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  background-size: cover;
body { 
  font-family: "museo-sans",sans-serif;
  color: #333; 
  margin: 0; 
h1 { 
  margin-left: 1rem; 
  font-size: 3rem; 
#intro { 
  width: 17%; 
  min-width: 15rem;
#intro, div[role="supplementary"] {   
  background: rgba(0,0,0,0.5);
  padding: 1rem; 
  color: #fff;
  font-size: 1.1rem;
div[role="supplementary"] {     
  position: absolute; 
  top: 0;
  right: 0;
  width: 15%;
#intro > div[role="supplementary"] {
  position: static;
  background: none;
  width: 100%;
#intro > div[role="supplementary"] figure { 
  display: none; 
div[role="supplementary"] figure { margin: 0; }
div[role="supplementary"] figure svg { 
  opacity: 0.5;
  margin: 1.3rem;
p { line-height: 1.4; }
sup { line-height: 0; }
figcaption { 
  font-size: 1.1rem;
  text-align: center; 
  font-style: italic;
figcaption i { font-style: normal; }
dt { font-weight: bolder; }

@media all and (max-width: 1200px) {
  #wrapper:before { content: 'mobile'; display: none; }
@media all and (max-width: 550px) {
   #intro { width: 100%; background-color: rgba(0,0,0,0.7); }
  h1 { text-align: center; margin-left: 0; }


                var intro = document.getElementById("intro"),
wrapper = document.getElementById("wrapper"),
sup = document.querySelector('div[role="supplementary"]'),
tablet = window.matchMedia("screen and (max-width: 1000px)");

function combinator(state){
if (state.matches) { 
} else {