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

              
                <main id="main">
 <h1 id="title"><strong>NELSON MANDELA</strong></h1>
 <p>He was a South African anti-apartheid revolutionary, political leader, 
and philanthropist who spent 27 years as political prisoner before becoming, <em>and a remarkable twist</em> the 
country's first black president.</p>
 <figure id="img-div">
 <img id="image">
<img
 class="pic-border"
 src="https://www.theguardian.com/world/gallery/2013/dec/05/nelson-mandela-life-in-pictures#img-1.jpg"
 alt="photo of Nelson mandela">
<figcaption id="img-caption"><strong>Nelson Mandela making closed fist "POWER TO THE PEOPLE" salute.</strong></figcaption>
</figure>
<section id="tribute-info">
<h3 id="headline">Here's a time line of Nelson Mandela's life:</h3>
<ul>
<li><strong>1918</strong> - Born in Mveso, Cape province, South Africa</li>
<li><strong>1938</strong> - Attends University of Fort Hare</li>
<li><strong>1944</strong> - First Marriage</li>
<li><strong>1944</strong> - Forms the A.N.C Youth League</li>
<li><strong>1952</strong> - Mandela starts law practise</li>
<li><strong>1956</strong> - Mandela arrested on treason charges, by apartheid goverment</li>
<li><strong>1958</strong> - Second marriage, during trial</li>
<li><strong>1961</strong> - Acquitted of treason</li>
<li><strong>1961</strong> - Mandela helps form querrilla army</li>
<li><strong>1962</strong> - Mandela arrested again</li>
<li><strong>1964</strong> - Sentenced to life in prison</li>
<li><strong>1990</strong> - Mandela freed</li>
<li><strong>1992</strong> - Breakup of second marriage</li>
<li><strong>1993</strong> - Mandela awarded with the Nobel Peace Price</li>
<li><strong>1994</strong> - Mandela becomes President</li>
<li><strong>1998</strong> - Third marriage at 80</li>
<li><strong>1999</strong> - Succeeded by Thabo Mbeki</li>
<li><strong>2013</strong> - Dies at the age 95.</li>
</ul>
<blockquote
cite="http://   ">
<h5>QUOTES</h5>
<p>"During my lifetime I have dedicated myself to this struggle of the African people. I have fought against white 
domination. I have fought against black domination. I have cherished the ideal of a democratic and free society in which 
all persons live together in harmony and with equal opportunities. It is an ideal which I hope to live for and to achieve. 
But if needs be, it is an ideal for which I am prepared to die."</p>
<p>"For to be free is not merely to cast off one's chains, but to live in a way that respects
 and enhances the freedom of others."
</p>
<p>
"The greatest glory in living lies not in never falling, but in rising every time we fall."
</p>
<p>
"In my country we go to prison first and then become President."</p>
</cite>
</bockquote>
<h3>Read more about this incredible human being on his
<a id="tribute-link"
href="https://en.wikipedia.org/wiki/Nelson_Mandela"
target="_blank">wikipedia entry</a>.
</h3>
</section>
</main>
</html>
              
            
!

CSS

              
                @import url('http://fonts.googleapis.com/css?family=Allerta+Stencil');
html {
font-size: 12px;
}
body {
font-family: "Allerta Stencil", Lato, "Monotype Corsiva", Gisha, "Bradley Hand IT", verdana, sans-serif;
font-size: 1.6rem;
line-height: 1.5;
text-align: center;
color: Dark-brown;
margin: 0;
}
h1 {
font-family: "Cooper Black", Castellar, "bauhaus 93", Broadway;
font-size: 4rem;
color: #08708a;
text-shadow: 2px 2px 5px cyan;
margin-bottom: 0;
}
@media (max-width: 460px) {
h1 {
font-size: 300%;
line-height: 1.2;
}
}
h5 {
   font-size: 3.25rem;
color: teal;
}
a {
  color: red;
}
a:visited {
  color: #74638f;
}
#main {
  margin: 30px 8px;
  padding: 15px;
 border: #FFDEAD solid 10px;
  border-radius: 40px;
  background: #f7dfd4;
}
@media (max-width: 460px) {
  #main {
    margin: 0;
}
}
img {
  max-width: 100%;
  display: block;
  height: auto;
  margin: 0 auto;
}
#img-div {
background: repeating-linear-gradient(45deg, #eabcac, #ffe4c4, #f7dfd4 40px);
border: #ffdead solid 10px;
border-radius: 40px;
padding: 10px;
margin: 0;
}
#img-caption {
  margin: 15px 0 5px 0;
color: teal;
}
.pic-border {
border-color: #ffdead;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}
@media (max-width: 460px) {
  #img-caption {
  font-size: 1.4rem;
}
}
#headline {
 margin: 50px 0;
 text-align: center;
}
ul {
 max-width: 550px;
 margin: 0 auto 50px auto;
 text-align: left;
 line-height: 1.6;
}
li {
 margin: 16px 0;
}
blockquote {
font-style: italic;
max-width: 545px
margin: 0 auto 50px auto;
text-align: left;
}
              
            
!

JS

              
                
              
            
!
999px

Console