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.
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script><script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<!-- -->
<main id="main">
<body>
<div class="thumbnail">
<h1 id="title">Dr. José Protasio Rizal</h1>
<h4><center><i>"The National hero of the Philippines"</i></center></h4>
</div>
<figure id="img-div">
<div>
<img id="image" src="https://cdn.asiatatler.com/asiatatler/i/ph/2020/04/17140416-rizal-la-solidaridad_article_1476x2000.jpg" alt="A picture of José Rizal"/>
<figcaption id="img-caption">(From L-R) Dr. José Rizal, Marcelo del Pilar and Mariano Ponce</figcaption>
</div>
</figure>
<!-- Timeline of José's Life below this line -->
<section>
<article class="tributes">
<ul>
<p id="tribute-info"><strong>Here's a time line of Dr. José Rizal's life:</strong></p>
<p><strong>José Rizal's Early Life</strong></p>
<li><b>1861 - </b> On June 19th José Rizal is born to become the seventh child born to his parents. Three days later Rizal was christened with the name José Protasio Rizal-Mercado y Alonso-Realonda.</li>
<li><b>1870 - </b> José begins school under the instruction of Justiniano Aquin Cruz at just nine years of age.</li>
<li><b>1871 - </b> José continues his education under the instruction of Lucas Padua.</li>
<li><b>1872 - </b> Rizal is examined by those in charge of college entrance to St. Tomas University in Manila; he enters the school system as a scholar.</li>
<li><b>1875 - </b> Rizal enters the Ateneo as a boarder at just 14 years of age.</li>
<p><strong> Writting Career</strong></p>
<li><b>1877 - </b> In November Rizal writes a poem and receives recognition for his writing from the Royal Economic Society of Friends of the Country, also known as Amigos del Pals. The recognition comes in the form of a diploma of merit and honorable mention.</li>
<li><b>1880 - </b> At the age of 19 Rizal writes another poem for a competition where he should have won first prize. However, he was not given this prize due to discrimination.
In December Rizal produces his first Operetta called On the Banks of the Pasig.</li>
<li><b>1881 - </b> Rizal creates the commemorative medal in wax for the Royal Economic Society of Friends centennial celebration.</li>
<p><strong>Emigrating</strong></p>
<li><b>1882 - </b> In May Rizal gets money from his brother and travels secretly from Manila to Spain aboard a French ship and railroad entering Spain at the Port Bou.
In June St. Tomas University realizes Rizal is nowhere to be found and threatens to take land away from his father who is a tenant even though his father has no idea of his whereabouts.
June 15 Rizal makes his arrival in Barcelona and begins to study again in Madrid in October of that same year.</li>
<li><b>1886 - </b>Rizal receives a degree in medicine from the Central University of Madrid at the age of 23. He then becomes an assistant to Dr. L. de Wecker and visits many universities in Berlin, Leipzig, and Heidelberg in the country of Germany.</li>
<p><strong>Fame... Then Death and Legacy</strong></p>
<li><b>1887 - </b> Rizal finishes his first novel titled Noli Me Tangere while staying in Berlin. The novel offends Catholic officials and Rizal is deemed to be a troublemaker</li>
<li><b>1888 - </b> In February Rizal leaves Spain and sets sail for Hong Kong in China. He continued to travel practice medicine and write.</li>
<li><b>1892 - </b> In August Rizal was detained aboard a ship traveling back to Spain. Rizal was charged with treason, sedition, and the formation of illegal societies. He was sent to an island and held.
He taught for four years while being held. He penned his last piece of writing called My Last Farewell and wrote an address to Filipino insurgents to lay down their arms against the Spanish. The address was never made public, but was added to the list of charges against him.</li>
<li><b>1896 - </b> His request to go to Cuba was approved. On the way to Cuba he was arrested and charged with conspiracy and sedition.
On December 27 he was condemned to death in a Spanish court.
On December 30th he was permitted to marry Joséphine two hours before he was shot by a firing squad.
He was buried in a secret grave.</li>
<li><b>1912 - </b>On December 30th the ashes of Rizal were transferred to the Rizal Mausoleum and December 30th is declared a national holiday in honor of his memory.
José Rizal's life and works were critical to those from the Philippines who were looking for an end to Spanish colonization.</li>
</ul>
</article>
<article class="quote blue-text">
<p><em> " He amado siempre a mi pobre tierra y estoy seguro de que la amaré hasta el último
momento, si acaso los hombres me son injustos; y exhalaré la vida feliz, contento de
pensar que todo lo que he sufrido, mi pasado, mi presente y mi porvenir, mi vida,
mis amores, mis alegrías, todo lo que he sacrificado por amor a ella. Sea cualquiera
mi suerte, moriré bendiciéndola y deseándola la aurora de su redención." - Dr. Jose Rizal-Mercado</em></p>
<p><em> I have always loved my poor homeland and I am sure that I will love it to the last
moment, if, perchance, human beings are unjust to me; and I will exhale my life happily, content in knowing that everything that I have suffered, my past, my present
and my future, my life, my loves, my joys, everything have I sacrificed for her. Whatever my fate should be, I will die blessing her and wishing for her the dawn of her
redemption. (my translation, Testamento 150) </em></p>
</article>
<footer>
<h4>To learn more about this wonderful hero and his heroic acts check out a revisit on the life of José Rizal on his <a id="tribute-link" href="https://ph.asiatatler.com/society/a-closer-look-on-the-more-human-side-of-national-hero-dr-José-rizal" target="_blank" > Tatler Entry</a>
</h4>
</footer>
</section>
</main>
html {
animation-name: fade-in;
animation-duration: 2s;
text-align: center;
margin: 0;
padding: 0;
box-sizing: border-box;
}
* {
margin: 0;
padding: 0;
box-sizing: inherit;
}
#main {
background: url("https://cdn-media-1.freecodecamp.org/imgr/MJAkxbh.png");
font-family: Inconsolata;
max-width: 100%;
background-position: center;
background-size: cover;
}
.thumbnail {
margin: 0 auto;
padding: 20px;
}
h1 {
color: black;
font-size: 2.7rem;
}
p {
margin: 20px auto 10px auto ;
}
#tribute-info {
margin: 0px auto 20px auto;
padding-top: 30px;
}
#img-div {
width: 90%;
/* height: 40%; */
margin: 0 auto;
}
img {
position: relative;
max-width: 100%;
display: block;
height: auto;
/* position: absolute; */
margin: 30px auto 10px auto;
border-radius: 15px;
}
figcaption {
font-family: monospace;
margin: 0 auto;
margin-bottom: 50px;
}
.tributes {
width: 80%;
margin: 0 auto;
}
ul {
text-align: left;
display: flex;
flex-direction: column;
background: #EFEFEF;
height: auto;
max-width: 100%;
padding: 20px;
/* position: relative; */
margin: 0 auto;
border-radius: 10px;
}
ul li {
margin: 10px;
list-style: none;
}
.quote {
width: 70%;
margin: 0 auto;
display: grid;
margin-bottom: 30px;
}
.blue-text {
color: #0441CC;
text-align: justify;
transform: all 2s linear;
}
.blue-text:hover {
color: red;
transition: all 2s linear;
}
footer {
color: #222;
padding-bottom: 30px;
margin: 0 auto;
}
a {
color: blue;
text-decoration: none;
}
a:hover {
color: red;
}
@keyframes fade-in {
from{
opacity: 0;
}
to{
opacity: 1;
}
}
Also see: Tab Triggers