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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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

              
                <main>
	<h1>πŸ› Safari Reader Mode Rejects &lt;code&gt;</h1>

	<article>
		<h2>❌ Example: Using &lt;code&gt; in &lt;p&gt;</h2>
		<p>This is an article about <code>&lt;code&gt;</code>. It’s the HTML tag you use to represent computer code, which is especially helpful for developer blog posts.</p>
		<p>Problem is, as soon as you put <code>&lt;code&gt;</code> in a <code>&lt;p&gt;</code> element in your <code>&lt;article&gt;</code>, Safari disables Reader Mode. 😱</p>
		<p>I know, right? Other online reading tools (Feedly, Pocket, Instapaper)</p>
	</article>

	<article>
		<h2>βœ… Workaround: Using &lt;span&gt;</h2>
		<p>This is an article about <span class="code">&lt;code&gt;</span>. It’s the HTML tag you use to represent computer code, which is especially helpful for developer blog posts.</p>
		<p>Problem is, as soon as you put <span class="code">&lt;code&gt;</span> in a <span class="code">&lt;p&gt;</span> element in your article, Safari disables Reader Mode. 😱</p>
	</article>

	<article>
		<h2>⚠️ Example: Using &lt;code&gt; in &lt;div&gt;</h2>
		<p></p>
	</article>
	
	<h2>References</h2>
	<ul>
		<li><a href="http://html5doctor.com/element-index/#code" target="_blank" rel="noopener">HTML5 Doctor: code</a></li>
		<li><a href="#" target="_blank" rel="noopener">Link #2</a></li>
		<li><a href="#" target="_blank" rel="noopener">Link #3</a></li>
	</ul>
</main>

              
            
!

CSS

              
                html {
	box-sizing: border-box;
}

*,
::after,
::before {
	box-sizing: inherit;
}

body {
	margin: 1rem auto 3rem;
	line-height: 1.4;
	tab-size: 4;
}

main {
	display: block; /* Fix IE rendering main as inline */
	margin: 0 auto;
	max-width: 36rem;
	padding-left: 1rem;
	padding-right: 1rem;
}

pre {
	border: 1px solid #ccc;
	padding: 1rem;
	overflow: auto;
	-webkit-overflow-scroll: touch;
}

/* Code Highlights */
code,
.code {
	padding: 0.2em;
	border-radius: 3px;
	background: #eee;
	font-family: monospace;
}
              
            
!

JS

              
                
              
            
!
999px

Console