Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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>The Universal Declaration of Human Rights</h1>
	<aside id="human-rights-logo">
		<img src="https://upload.wikimedia.org/wikipedia/commons/d/d3/HumanRightsLogo.svg" alt="Human Rights Logo"/>
		<p>The Human Rights Logo has its origin in the international “Logo for Human Rights” initiative, which was started in 2010. Its goal was to create an internationally recognized logo to support the global human rights movement. The winning logo was created by Predrag Stakić from Serbia.</p>
		<footer>(from Wikipedia)</footer>
	</aside>
	<div id="human-rights-text">
		<section id="article1">
			<h2>Article 1</h2>
			<p>All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.</p>
		</section>
		<section id="article2">
			<h2>Article 2</h2>
			<p>Everyone is entitled to all the rights and freedoms set forth in this Declaration, without distinction of any kind, such as race, colour, sex, language, religion, political or other opinion, national or social origin, property, birth or other status. Furthermore, no distinction shall be made on the basis of the political, jurisdictional or international status of the country or territory to which a person belongs, whether it be independent, trust, non-self-governing or under any other limitation of sovereignty.</p>
		</section>
		<section id="article3">
			<h2>Article 3</h2>
			<p>Everyone has the right to life, liberty and security of person.</p>
		</section>
		<section id="article4">
			<h2>Article 4</h2>
			<p>No one shall be held in slavery or servitude; slavery and the slave trade shall be prohibited in all their forms.</p>
		</section>
	</div>
</main>

              
            
!

CSS

              
                *, ::before, ::after { box-sizing: border-box }

html
{
	font: 1.1em/1.4 Calibri, sans-serif;
	background: white;
	color: black;
}

body
{
	margin: 0;
	background: transparent;
	color: inherit;
}

main
{
	margin: auto;
	padding: 0 1em;	
}

@media (min-width: 40em)
{
	main
	{
		max-width: 50em;
		display: flex;
		flex-flow: row wrap;
	}

	h1 { flex: 1 0 100% }

	#human-rights-logo
	{
		flex: 1;
		padding-right: 3rem;
	}

	#human-rights-text
	{
		flex: 0 0 62%;
	}
}

h1
{
	margin: 1.6rem 0;
	font-size: 1.4em;
	line-height: 1.1;
}

section
{
	margin-bottom: 1.4em;
}

h2, p
{
	margin: 0;
	font-size: 1em;
}

aside
{
	font-size: 0.9em;
	line-height: 1.2;
	color: hsl(0, 0%, 20%);
	margin-bottom: 2.4rem;
}

aside img
{
	margin-bottom: 1.2em;
}

              
            
!

JS

              
                
              
            
!
999px

Console