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.
<div class="main" id="demo" data-lining>
<h1>The Study of Poetry</h1>
<p>“The future of poetry is immense, because in poetry, where it is worthy of its high destinies, our race, as time goes on, will find an ever surer and surer stay. There is not a creed which is not shaken, not an accredited dogma which is not shown to be questionable, not a received tradition which does not threaten to dissolve. Our religion has materialised itself in the fact, in the supposed fact; it has attached its emotion to the fact, and now the fact is failing it. But for poetry the idea is everything; the rest is a world of illusion, of divine illusion. Poetry attaches its emotion to the idea; the idea is the fact. The strongest part of our religion to-day is its unconscious poetry.”</p>
<p>Let me be permitted to quote these words of my own [from <em>The Hundred Greatest Men—</em>ed.], <em>as uttering the thought which should, in my opinion, go with us and govern us in all our study of poetry. In the present work</em> [<em>The English Poets</em>—ed.] it is the course of one great contributory stream to the world-river of poetry that we are invited to follow. We are here invited to trace the stream of English poetry. But whether we set ourselves, as here, to follow only one of the several streams that make the mighty river of poetry, or whether we seek to know them all, our governing thought should be the same. We should conceive of poetry worthily, and more highly than it has been the custom to conceive of it. We should conceive of it as capable of higher uses, and called to higher destinies, than those which in general men have assigned to it hitherto. More and more mankind will discover that we have to turn to poetry to interpret life for us, to console us, to sustain us. Without poetry, our science will appear incomplete; and most of what now passes with us for religion and philosophy will be replaced by poetry. Science, I say, will appear incomplete without it. For finely and truly does Wordsworth call poetry “the impassioned expression which is in the countenance of all science”; and what is a countenance without its expression? Again, Wordsworth finely and truly calls poetry “the breath and finer spirit of all knowledge”; our religion, parading evidences such as those on which the popular mind relies now; our philosophy, pluming itself on its reasonings about causation and finite and infinite being; what are they but the shadows and dreams and false shows of knowledge? The day will come when we shall wonder at ourselves for having trusted to them, for having taken them seriously; and the more we perceive their hollowness, the more we shall prize “the breath and finer spirit of knowledge” offered to us by poetry.</p>
<p>But if we conceive thus highly of the destinies of poetry, we must also set our standard for poetry high, since poetry, to be capable of fulfilling such high destinies, must be poetry of a high order of excellence. We must accustom ourselves to a high standard and to a strict judgment. Sainte-Beuve relates that Napoleon one day said, when somebody was spoken of in his presence as a charlatan: “Charlatan as much as you please; but where is there not charlatanism?”—“Yes” answers Sainte-Beuve, “in politics, in the art of governing mankind, that is perhaps true. But in the order of thought, in art, the glory, the eternal honour is that charlatanism shall find no entrance; herein lies the inviolableness of that noble portion of man’s being” [<em>Les Cahiers</em>—ed.]. It is admirably said, and let us hold fast to it. In poetry, which is thought and art in one, it is the glory, the eternal honour, that charlatanism shall find no entrance; that this noble sphere be kept inviolate and inviolable. Charlatanism is for confusing or obliterating the distinctions between excellent and inferior, sound and unsound or only half-sound, true and untrue or only half-true. It is charlatanism, conscious or unconscious, whenever we confuse or obliterate these. And in poetry, more than anywhere else, it is unpermissible to confuse or obliterate them. For in poetry the distinction between excellent and inferior, sound and unsound or only half-sound, true and untrue or only half-true, is of paramount importance. It is of paramount importance because of the high destinies of poetry. In poetry, as in criticism of life under the conditions fixed for such a criticism by the laws of poetic truth and poetic beauty, the spirit of our race will find, we have said, as time goes on and as other helps fail, its consolation and stay. But the consolation and stay will be of power in proportion to the power of the criticism of life. And the criticism of life will be of power in proportion as the poetry conveying it is excellent rather than inferior, sound rather than unsound or half-sound, true rather than untrue on half-true.</p>
<p>The best poetry is what we want; the best poetry will be found to have a power of forming, sustaining, and delighting us, as nothing else can. A clearer, deeper sense of the best in poetry, and of the strength and joy to be drawn from it, is the most precious benefit which we can gather from a poetical collection such as the present. And yet in the very nature and conduct of such a collection there is inevitably something which tends to obscure in us the consciousness of what our benefit should be, and to distract us from the pursuit of it. We should therefore steadily set it before our minds at the outset, and should compel ourselves to revert constantly to the thought of it as we proceed.</p>
<p>Yes; constantly in reading poetry, a sense for the best, the really excellent, and of the strength and joy to be drawn from it, should be present in our minds and should govern our estimate of what we read. But this real estimate, the only true one, is liable to be superseded, if we are not watchful, by two other kinds of estimate, the historic estimate and the personal estimate, both of which are fallacious. A poet or a poem may count to us historically, they may count to us on grounds personal to ourselves, and they may count to us really. They may count to us historically. The course of development of a nation’s language, thought, and poetry, is profoundly interesting; and by regarding a poet’s work as a stage in this course of development we may easily bring ourselves to make it of more importance as poetry than in itself it really is, we may come to use a language of quite exaggerated praise in criticising it; in short, to overrate it. So arises in our poetic judgments the fallacy caused by the estimate which we may call historic. Then, again, a poet or poem may count to us on grounds personal to ourselves. Our personal affinities, likings and circumstances, have great power to sway our estimate of this or that poet’s work, and to make us attach more importance to it as poetry than in itself it really possesses, because to us it is, or has been, of high importance. Here also we overrate the object of our interest, and apply to it a language of praise which is quite exaggerated. And thus we get the source of a second fallacy in our poetic judgments—the fallacy caused by an estimate which we may call personal.</p>
</div>
<div class="footer">
Made with <span id="heart">LOVE</span> by <a href="https://twitter.com/zhoumm" target="_blank">@zhoumm</a>, and base on <a href="http://zencode.in/lining.js/" target="_blank">Lining.js</a> and <a href="http://scrollrevealjs.org/" target="_blank">scrollReveal.js</a>.
</div>
body {
line-height: 1.8;
font-size: 16px;
font-family: 'Roboto Slab', serif;
color: #F4F1DE;
background-color: #2f3c45;
}
a {
position: relative;
color: #F4F1DE;
}
a::before {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
border-color: 1px solid ##F4F1DE;
}
#demo {
margin: 3em auto;
width: 640px;
}
[data-sr] {
visibility: hidden;
}
#heart {
position: relative;
display: inline-block;
width: 40px;
height: 20px;
text-indent: -9999px;
}
#heart:before,
#heart:after {
position: absolute;
content: '';
left: 20px;
top: 0;
width: 20px;
height: 30px;
background: tomato;
-moz-border-radius: 50px 50px 0 0;
border-radius: 50px 50px 0 0;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
-webkit-transform-origin: 0 100%;
-moz-transform-origin: 0 100%;
-ms-transform-origin: 0 100%;
-o-transform-origin: 0 100%;
transform-origin: 0 100%;
}
#heart:after {
left: 0;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
-webkit-transform-origin: 100% 100%;
-moz-transform-origin: 100% 100%;
-ms-transform-origin: 100% 100%;
-o-transform-origin: 100% 100%;
transform-origin :100% 100%;
}
.footer {
margin: 3em auto 6em;
width: 640px;
}
/**
Made with LOVE by @zhoumm, and base on Lining.js and scrollReveal.js.
**/
var demo = document.getElementById('demo');
demo.addEventListener('afterlining', function (e) {
demo.className = 'visible';
var element = e.target;
var lines = element.getElementsByTagName('text-line');
var line;
var srs = [
'enter left',
'enter right'
];
for (var i = 0, l = lines.length; i < l; i++) {
line = lines[i];
line.setAttribute('data-sr', srs[Math.floor(Math.random() * 2)]);
}
window.sr = new scrollReveal({
reset: true,
move: '30px',
over: '1.5s',
scale: {
direction: 'up',
power: '0%'
}
});
});
Also see: Tab Triggers