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.
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js" id="test_box"></script>
<title>Tribute page - Johann Wolfgang von Goethe</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Spectral" />
</head>
<body>
<div id="main">
<div id="center_column">
<div id="title" class="content">
<h1>Johann Wolfgang von Goethe</h1>
</div>
<div id="img-div" class="content">
<img src="https://1zl13gzmcsu3l9yq032yyf51-wpengine.netdna-ssl.com/wp-content/uploads/2019/03/Johann-Wolfgang-von-Goethe-Quotes-1024x538.png" id="image" alt="Picture of Goethe and quote"/>
<p id="img-caption">Among many other things, Goethe is famous for his simple and profound expressions of common wisdom. He published many of these in his book <em>Maxims and Reflections</em>, which is <a href="http://www.gutenberg.org/ebooks/33670">available for free at Project Gutenberg</a>.</p>
</div>
<div id="tribute-info" class="content">
<h2>Why Goethe?</h2>
<p>I like to think of Goethe as something of an arch-nemesis. On the one hand, he's probably the most impressively talented human being in recorded history. On the other hand, he represents everything I oppose, having pioneered the Romantic secularism which made the ideological death cults of the 20th and 21st centuries possible.</p>
<p>The explanation of this relies on Ernest Becker's book <a href="https://www.amazon.com/Denial-Death-Ernest-Becker-ebook/dp/B002C7Z57C/ref=tmm_kin_swatch_0?_encoding=UTF8&qid=&sr="><em>The Denial of Death</em></a>. From <a href="https://en.wikipedia.org/wiki/The_Denial_of_Death#Background">the wiki</a>:</p>
<p>"Immortality projects are one way that people manage death anxiety. Some people, however, will keep themselves drunk or use drugs to escape their anxiety in the face of death.[3] Others will try to manage the terror of death by ignoring the problem and by “tranquilizing oneself with the trivial.” (A term Becker borrows from Kierkegaard.) Becker describes the success of the Christian world picture as being able to take “slaves, cripples... the simple and the mighty” and turn them into heroes of their own story by looking beyond this world to the heavenly realm where they will be rewarded for their heroism by God and live with Him forever.[4]</p>
<p>"Becker argues that the arbitrariness of human-invented immortality projects makes them naturally prone to conflict. When one immortality project conflicts with another, it is essentially an accusation of 'wrongness of life', and so sets the context for both aggressive and defensive behavior. Each party will want to prove its belief system is superior, a better way of life. Thus these immortality projects are considered a fundamental driver of human conflict, such as in wars, bigotry, genocide, and racism.[citation needed]</p>
<p>"Another theme running throughout the book is that humanity's traditional "hero-systems", such as religion, are no longer convincing in the age of reason. However, he argued the loss of religion leaves humanity with impoverished resources for necessary illusions. Science attempts to serve as an immortality project, something that Becker believes it can never do because it is unable to provide agreeable, absolute meanings to human life. The book states that we need new convincing "illusions" that enable us to feel heroic in ways that are agreeable.[5] Becker, however, does not provide any definitive answer, mainly because he believes that there is no perfect solution. Instead, he hopes that gradual realization of humanity's innate motivations, namely death, can help to bring about a better world."</p>
</div>
<div id="testimonial" class="content">
<h2>Testimonial to Goethe's influence</h2>
<p>“It is difficult to overestimate the value of Goethe’s work to humanity. The bequest which he left to the world in his writings, and in the whole intellectual result of his life, is not as yet appreciated at its full worth; because, intellectually, the world has not yet caught up to him. His influence today asserts itself in a hundred minute ways—even where no one suspects it. The century has received the stamp and impress of his mighty personality. The intellectual currents of the age, swelled and amplified by later tributaries, flow today in the directions which Goethe indicated.” - Hjalmar Boyesen, <em>The Life of Goethe</em> (1885)</p>
</div>
<div id="talents" class="content">
<h2>Goethe's superhuman talents</h2>
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/HeNNQ_mIYpI?start=287" frameborder="0" allowfullscreen>
</iframe>
</div>
<p>To read a summary of the remarkable achievements outlined in this video, <a href="http://www.eoht.info/page/IQ%3A+200%2B" id="tribute-link" target="_blank">read the subheading dedicated to Goethe in this ranking of high-IQ historical figures</a>. It's about 1/3 of the way down the page. For example:</p>
<p>"at age 7, to sugar the pill of grammar, he invented a novel in which the members of a family in various parts of the world wrote letters to each other <em>in six different languages and styles</em>" (emphasis added).</p>
</div>
<div id="maxim_generator" class="content">
<h2>Maxim generator</h2>
<p>Coming soon, once I learn how to code it. This will be good practice for handling JSON objects.</p>
</div>
</div>
</div>
</body>
</html>
#main {
display: grid;
grid-template-columns: auto auto auto;
font-family: Spectral, sans-serif;
}
#center_column {
/*border-style: dashed;*/
/*border-width: 1px;*/
grid-column: 2/2;
max-width: 500px;
min-width: 100%;
}
h1, h2 {
text-align: center;
}
p {
text-align: justify;
}
.content {
display: block;
/*border-style: dashed;*/
/*border-width: 1px;*/
padding: 1px 50px 1px 50px;
background: white;
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}
body {
background: silver
}
#img-div {
}
#image {
display: block;
max-width: 100%;
max-height: 538px;
height: auto;
align-self: center;
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}
.video-container {
position: relative;
padding-bottom: 56.25%;
padding-top: 30px;
height: 0;
overflow: hidden;
}
.video-container iframe,
.video-container object,
.video-container embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
Also see: Tab Triggers