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 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.
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 esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM 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 class="container-fluid">
<header>
<h1 class="text-primary">Modern Wisdom From Ancient Greeks<small><p>Quotes from the ancients are as relevant today as when they recorded</p></small></h1>
</header>
<!------------------------>
<section id="content">
<h3>Heraclitus</h3>
<div class="row">
<div class="col-md-4 container"> <img class="img-responsive" src="http://8170.pbworks.com/f/1414334830/heraclitus_of_ephesus.jpg" height></div>
<div class="col-md-8">
<p>Heraclitus (circa 535-475 BCE) is considered the most important pre-Socratic Greek philosopher. He was born in the Greek city of Ephesus. Little is known of his life and we have only a few sentences of his work.</p></div>
<div class="col-md-8"><ul>
<li>“Day by day, what you choose, what you think and what you do is who you become.”</li>
<li>“Everything flows and nothing abides, everything gives way and nothing stays fixed."</li>
<li>“No man ever steps in the same river twice, for it’s not the same river and he’s not the same man.”</li></ul></div>
</div>
<h3>Pericles</h3>
<div class="row">
<div class="col-md-4 container"> <img class="img-responsive" src="http://www.ml-chiropractic.com/wp-content/uploads/2015/08/Pericles.jpg" height></div>
<div class="col-md-8"><p>Pericles (circa 495-429 BCE) was the most prominent and influential Greek statesman and orator during the Golden Age of Athens. In 461, he became the ruler of Athens, a role he would occupy until his death. During his leadership, he built the Acropolis and the Parthenon and led Athens' recapture of Delphi, the siege on Samos, and the invasion of Megara. In 429, he died of the plague.</p></div>
<div class="col-md-8"><ul>
<li>“Just because you do not take an interest in politics doesn't mean politics won't take an interest in you.”</li>
<li>“Time is the wisest counselor of all.” </li>
<li>“What you leave behind is not what is engraved in stone monuments, but what is woven into the lives of others.”</li> </ul></div>
</div>
<h3>Socrates</h3>
<div class="row">
<div class="col-md-4 container"> <img class="img-responsive" src="https://upload.wikimedia.org/wikipedia/commons/a/a4/Socrates_Louvre.jpg"></div>
<div class="col-md-8"><p>Socrates (circa 469—399 BCE) was a classical Greek philosopher and is considered one the founders of Western logic and philosophy. He established an ethical system based on human reason rather than theological doctrine. He maintained that the more we come to know ourselves, the greater will be our ability to reason and make choices that lead to true happiness. He is known to us mostly through the writings of his students, particularly Plato. When the political climate of Greece turned, Socrates was sentenced to death by hemlock poisoning in 399 BCE. He accepted this judgment rather than fleeing into exile.</p>
</div>
<div class="col-md-8"><ul>
<li>“Beware the barrenness of a busy life.”</li>
<li>“He is richest who is content with the least, for contentment is the wealth of nature.”</li>
<li>“The only true wisdom is in knowing you know nothing.”</li> </ul> </div>
</div>
<h3>Plato</h3>
<div class="row">
<div class="col-md-4 container"> <img class="img-responsive" src="http://www.thefamouspeople.com/profiles/thumbs/plato-2.jpg"></div>
<div class="col-md-8"><p>Plato (circa 428—348 BCE) was a Greek philosopher. Like Socrates, he is considered one of the founders of Western philosophy. He was a student of Socrates’ and a mentor to Aristotle. He founded The Academy of Athens, which was the first institute of higher learning in the Western world.</p></div>
<div class="col-md-8"><ul>
<li>“The greatest wealth is to live content with little.”</li>
<li>“Courage is knowing what not to fear.”</li>
<li>“Necessity is the mother of invention.”</li>
<li>“Ignorance is the root and stem of all evil.”</li></ul></div>
</div>
<h3>Aristotle</h3>
<div class="row">
<div class="col-md-4 container"> <img class="img-responsive" src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Aristotle_Altemps_Inv8575.jpg/330px-Aristotle_Altemps_Inv8575.jpg"></div>
<div class="col-md-8"><p>Aristotle (circa 384—322 BCE) was a Greek philosopher who is also considered one of the founders of Western philosophy. When he turned 17, he joined Plato’s Academy and stayed until he was 37. After Plato died, Aristotle left Athens and became a tutor for Alexander the Great. In 335, he founded the Lyceum in Athens. His writings cover an incredible array of subjects including physics, metaphysics, poetry, theater, music, logic, rhetoric, politics, ethics, and even biology and zoology.</p></div>
<div class="col-md-8"><ul>
<li>“I count him braver who overcomes his desires than him who conquers his enemies, for the hardest victory is over the self.”</li>
<li>“Educating the mind without educating the heart is no education at all.”</li>
<li>“It is the mark of an educated man to be able to entertain a thought without accepting it.”</li>
<li>“We are what we repeatedly do. Excellence then, is not an act, but a habit.”</li></ul></div>
</div>
<h3>Epictetus</h3>
<div class="row">
<div class="col-md-4 container"> <img class="img-responsive" src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Epicteti_Enchiridion_Latinis_versibus_adumbratum_%28Oxford_1715%29_frontispiece.jpg/300px-Epicteti_Enchiridion_Latinis_versibus_adumbratum_%28Oxford_1715%29_frontispiece.jpg"></div>
<div class="col-md-8"><p>Epictetus (circa 55—135 AD) was a Greek sage. He was born a slave in what is modern-day Turkey. As a young man, he gained his freedom, moved to Rome, and began to teach philosophy. When philosophers were banished from Rome in 89 AD, Epictetus left and started his own school in Nicopolis in Northwest Greece, where he lived for the rest of his life. His teachings were written down and published by his pupil Arrian.</p></div>
<div class="col-md-8"><ul>
<li>“He is a wise man who does not grieve for the things which he has not, but rejoices for those which he has.”</li>
<li>“Wealth consists not in having great possessions, but in having few wants.”</li>
<li>“Make the best use of what’s in your power and take the rest as it happens.”</li></ul>
</div>
</div>
</section>
<!------------------------>
<footer>
</footer></div>
</body>
/*Basic layout styles */
body {
width: 1280px;
margin: 0 auto;
font-family: 'Cinzel', serif;
/* 'Poiret One', cursive;*/
}
footer {
clear:both;
overflow:hidden;
height: 150px;
}
/* Content region styles */
/*header styles*/
header {
background: black;
padding-top: 1px;
overflow: hidden;
margin-bottom: 1.5em;
padding-left: 50px;
border-radius: 8px;
}
/*section styles*/
section h3{
border-bottom: 2px solid gray;
margin-bottom: 1em;
margin-top: 2.5em;
}
/*paragraph styles*/
.row p{
font-family:'Poiret One', cursive;
}
li{
line-height:2.5;
}
/* Element styles */
/* imgs */
.container {
width: 200px;
height: 120px;
margin-bottom: 5em;
}
/* resize images */
.container img {
width: 100%;
height: auto;
border-radius: 8px;
}
Also see: Tab Triggers