HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
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.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
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.
Using packages here is powered by Skypack, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ES6 import
usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<body>
<div style="padding:30px; margin:5%; 10%; background-color:#ededbd;border-radius:5px">
<h1 class="display-1 text-center">Nelson Mandela</h1>
<h3 class="text-center">A man of courage, grace and conviction</h3>
<div style="max-width:800px; margin: auto"
<p class="text-center" style="max-width:30px">
<blockquote class="blockquote">
<em>"I learned that courage was not the absence of fear, but the triumph over it. The brave man is not he who does not feel afraid, but he who conquers that fear."</em>
<footer>- Nelson Mandela</footer>
</blockquote>
</p>
<figure>
<p class="text-center"><img class="img-thumbnail" src="http://b-i.forbesimg.com/mfonobongnsehe/files/2013/12/Mandela.jpg" alt="Picture of Nelson Mandel"/>
<figcaption>The famous friendly smile of Nelson Mandela</figcaption>
</figure>
<div class="text-left" style="background-color:white; border-style:solid; border-color: #dd8f08; margin:2% 8%; padding: 20px 30px">
<h3>Key Events in Nelson Mandela's Life</h3>
<ul>
<li><strong>1918, July 18</strong> - Born Rolihlahla Mandela at Mvezo in the Transkei</li>
<li><strong>1925</strong> - Attends primary school near Qunu (receives the name ‘Nelson’ from a teacher)</li>
<li><strong>1930</strong> - Father dies. Entrusted to Thembu Regent Jongintaba Dalindyebo at the age of 12</li>
<li><strong>1934</strong> - Undergoes initiation; Attends Clarkebury Boarding Institute in Engcobo</li>
<li><strong>1937</strong> - Attends Healdtown, the Wesleyan College at Fort Beaufort</li>
<li><strong>1939</strong> - Enrolls at the University College of Fort Hare, in Alice</li>
<li><strong>1940</strong> - Expelled</li>
<li><strong>1941</strong> - Escapes an arranged marriage; becomes a mine security officer; starts articles at the law firm Witkin, Sidelsky & Eidelman</li>
<li><strong>1942</strong> - Completes BA through the University of South Africa (UNISA)</li>
<li><strong>1943</strong> - Graduates with BA from Fort Hare; Enrols for an LLB at Wits University</li>
<li><strong>1944</strong> - Co-founds the ANC Youth League (ANCYL); marries Evelyn Ntoko Mase – they have four children: Thembekile (1945); Makaziwe (1947 – who dies after nine months); Makgatho (1950); Makaziwe (1954)</li>
<li><strong>1951</strong> - Elected President of the ANCYL</li>
<li><strong>1952</strong> - Defiance Campaign begins; Arrested and charged for violating the Suppression of Communism Act; Elected Transvaal ANC President; Convicted with J.S Moroka, Walter Sisulu and 17 others under the Suppression of Communism Act; Sentenced to nine months imprisonment with hard labor, suspended for two years; Elected first of ANC deputy presidents; Opens South Africa’s first black law firm with Oliver Tambo</li>
<li><strong>1956</strong> - Arrested and later joins 155 others on trial for teason. All are acquitted by 29 March 1961</li>
<li><strong>1958</strong> - Divorces Evelyn Mase; Marries Nomzamo Winnie Madikizela – they have two daughters: Zenani (1959) and Zindzi (1960)</li>
<li><span style="color:#ce0674"><strong>1960</strong> - Sharpeville Massacre; A State of Emergency is imposed and he is among thousands detained; The ANC is banned</span></li>
<li><strong>1961</strong> - Goes underground; Umkhonto weSizwe (MK) is formed</li>
<li><strong>1962</strong> - Sentenced to five years in prison for incitement and leaving the country without a passport</li>
<li><strong>1963</strong> - Sent to Robben Island; Returned to Pretoria Local Prison; Appears in court for the first time in what becomes known as the Rivonia Trial, with Walter Sisulu, Denis Goldberg, Govan Mbeki, Ahmed Kathrada, Lionel 'Rusty' Bernstein, Raymond Mhlaba, James Kantor, Elias Motsoaledi and Andrew Mlangeni; Pleads not guilty to sabotage in the Rivonia Trial; James Kantor discharged and released; <span style="color:#ce0674"><strong>Sentenced to life imprisonment</strong></span>; Arrives on Robben Island</li>
<li><strong>1985</strong> - Rejects, through his daughter, Zindzi, South African President PW Botha's offer to release him if he renounces violence</li>
<li><strong>1990</strong> - ANC is unbanned; <span style="color:#ce0674"><strong>Released</strong></span>; Elected ANC Deputy President</li>
<li><strong>1993</strong> - Awarded the Nobel Peace Prize with President FW de Klerk</li>
<li><strong>1994</strong> - <span style="color:#ce0674"><strong>Votes for the first time in his life</strong></span>; Elected by Parliament as first president of a democratic South Africa</li>
<li><strong>1996</strong> - Divorces Winnie Mandela</li>
<li><strong>1998</strong> - Marries Graça Machel on his 80th birthday</li>
<li><strong>1999</strong> - Steps down after one term as President, establishes the Nelson Mandela Foundation</li>
<li><strong>2001</strong> - Diagnosed with prostate cancer</li>
<li><strong>2004</strong> - Announces that he will be stepping down from public life;
<li><strong>2012</strong> - Celebrates his 94th birthday with his family in Qunu, Transkei</li>
<li><strong>2013, 5 December</strong> - Passes away at home in Johannesburg</li>
</u>
</div>
<h2>Find out more about this amazing soul on his <a href="https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwiFsqr4867VAhWHWD4KHWHZAS4QFggoMAA&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FNelson_Mandela&usg=AFQjCNH7CENxRjCu4imRRyffmQBppoCirg" target="_blank">Wikipedia entry</a><h2>
</div>
</div>
</body>
Also see: Tab Triggers