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.
<div class="sample1">
<blockquote>
<p>愛はお互いを見つめ合うことではなく、ともに同じ方向を見つめることである。</p>
<cite>サン=テグジュペリ</cite>
</blockquote>
</div>
<div class="sample2">
<blockquote>
<p>一段深く考える人は、
自分がどんな行動をしどんな判断をしようと、
いつも間違っているということを知っている。</p>
<cite>ニーチェ</cite>
</blockquote>
</div>
<div class="sample3">
<blockquote>
<p>人は、物以上に、回復して、新しくなり、生き返り、再生し、報われることが必要なの。決して、誰も見捨ててはいけません。</p>
<cite>オードリー・ヘップバーン</cite>
</blockquote>
</div>
<div class="sample4">
<blockquote>
<p>人は自分が必要とされていないと思うとき、絶望します。彼らは必要な人たちです。なぜなら私が学べるからです。</p>
<cite>マザー・テレサ</cite>
</blockquote>
</div>
<div class="sample5">
<blockquote>
<p>今もなお、最も勇気のいる行動とは、
自分の頭で考え続けること。
そしてそれを声に出すこと。</p>
<cite>ココ・シャネル</cite>
</blockquote>
</div>
<div class="sample6">
<blockquote>
<p>あなたにできること、あるいはできると夢見ていることがあれば、今すぐ始めなさい。向こう見ずは天才であり、力であり、魔法です。</p>
<cite>ゲーテ</cite>
</blockquote>
</div>
<div class="sample7">
<blockquote>
<p>人の言うことなんて気にしちゃだめだよ。
「こうすれば、ああ言われるだろう・・・」
こんなくだらない感情のせいで、
どれだけの人がやりたいこともできずに
死んでいくのだろう。</p>
<cite>ジョン・レノン</cite>
</blockquote>
</div>
<div class="sample8">
<blockquote>
<p>学習より創造である。創造こそ生の本質なのだ。</p>
<cite>ユリウス・カエサル</cite>
</blockquote>
</div>
<div class="sample9">
<blockquote>
<p>優しさとは、耳の聞こえない者も聞くことができ、目の見えない者も見ることができる言葉なんだ。</p>
<cite>マーク・トゥエイン</cite>
</blockquote>
</div>
<div class="sample10">
<blockquote>
<p>優しさとは、耳の聞こえない者も聞くことができ、目の見えない者も見ることができる言葉なんだ。</p>
<cite>マーク・トゥエイン</cite>
</blockquote>
</div>
.sample1,.sample2,.sample3,.sample4,.sample5,.sample6,.sample7,.sample8,.sample9,.sample10{
width:480px;
margin:50px auto;
}
.sample1 blockquote{
position:relative;
border-left:3px solid #DA8596;
padding-left:10px;
}
.sample1 blockquote:before{
position:absolute;
font-family:'FontAwesome';
content:'\f10d';
font-size: 20px;
color:#DA8596;
}
.sample1 blockquote p{
position:relative;
padding-left:30px;
}
.sample1 blockquote cite{
display: block;
font-size:0.8rem;
color:#F8C8B2;
text-align:right;
}
.sample2 blockquote{
position:relative;
border:1px solid #8BC0B8;
border-radius:10px;
padding:20px;
}
.sample2 blockquote:before{
position:absolute;
font-family:'FontAwesome';
content:'\f10d';
font-size: 20px;
color:#8BC0B8;
top:10px;
left:10px;
}
.sample2 blockquote:after{
position:absolute;
font-family:'FontAwesome';
content:'\f10e';
font-size: 20px;
color:#8BC0B8;
right:10px;
bottom:10px;
}
.sample2 blockquote cite {
display: block;
font-size: 0.8rem;
text-align: right;
color: #D4DED7;
padding-right:20px;
}
.sample3 blockquote{
position:relative;
border-top:1px solid #7A87B0;
border-bottom:1px solid #7A87B0;
padding:10px;
}
.sample3 blockquote:before{
position:absolute;
background-color:#FFFFFF;
color:#7A87B0;
font-family:'FontAwesome';
content:'\f10d';
line-height:1;
text-align:center;
top:-20px;
left:-10px;
padding:10px;
font-size:20px;
}
.sample3 blockquote:after{
position:absolute;
right:-10px;
bottom:-20px;
background-color:#FFFFFF;
padding:10px;
color:#7A87B0;
font-family:'FontAwesome';
content:'\f10e';
line-height:1;
text-align:center;
font-size:20px;
}
.sample3 blockquote cite {
display: block;
padding-right:30px;
font-size: 0.8rem;
text-align: right;
color: #808080;
}
.sample4 blockquote{
position:relative;
background:#FBDFDF;
border-radius:10px;
padding:20px;
}
.sample4 blockquote:before{
position:absolute;
left:45%;
top:-24px;
background-color:#FFFFFF;
color:#808080;
border:2px solid #FBDFDF;
box-sizing:border-box;
font-family:'FontAwesome';
content:'\f10e';
line-height:1;
padding-top:12px;
text-align:center;
width:48px;
height:48px;
font-size:20px;
border-radius:24px;
}
.sample4 blockquote p {
color:#808080
}
.sample4 blockquote cite {
display: block;
border-top:1px solid #808080;
padding-top:10px;
font-size: 0.8rem;
text-align: center;
color: #808080;
}
.sample5 blockquote {
position: relative;
background-color: #f9fbf9;
border-top: 1px solid #B7D7B7;
border-bottom: 1px solid #B7D7B7;
box-shadow: 0 0 0 10px #f9fbf9;
padding: 20px;
}
.sample5 blockquote p {
margin-top: 20px;
}
.sample5 blockquote p::before {
font-family:'FontAwesome';
content:'\f10d';
font-size: 24px;
position: absolute;
top: 10px;
left: 50%;
color: #B7D7B7;
}
.sample5 blockquote cite {
display: block;
font-size: 0.8rem;
text-align: right;
color: #B7D7B7;
}
.sample6 blockquote{
position:relative;
border-left:3px double #997bad;
padding-left:10px;
background:#e5e6f4;
}
.sample6 blockquote:before{
position:absolute;
font-family:'FontAwesome';
content:'\f10d';
font-size: 18px;
color:#997bad;
padding-top:10px;
}
.sample6 blockquote p{
position:relative;
padding: 30px 10px 0px;
}
.sample6 blockquote cite{
display: block;
font-size:0.8rem;
color:#997bad;
text-align:right;
padding:10px;
}
.sample7 blockquote{
position:relative;
background:#F9eada;
border-radius:10px;
padding:20px;
}
.sample7 blockquote:before{
position:absolute;
left:5%;
top:-24px;
color:#808080;
box-sizing:border-box;
font-family:'FontAwesome';
content:'\f10d';
line-height:1;
padding-top:12px;
text-align:left;
font-size:40px;
}
.sample7 blockquote p {
color:#808080
}
.sample7 blockquote cite {
display: block;
border-top:1px solid #808080;
padding-top:10px;
font-size: 0.8rem;
text-align: right;
color: #808080;
}
.sample8 blockquote{
position:relative;
border:1px solid #a3c7db;
background:#FFFFF;
padding:20px;
}
.sample8 blockquote:before{
position:absolute;
left:45%;
top:-24px;
background-color:#a3c7db;
color:#FFFFFF;
border:2px solid #a3c7db;
box-sizing:border-box;
font-family:'FontAwesome';
content:'\f10d';
line-height:1;
padding-top:12px;
text-align:center;
width:48px;
height:48px;
font-size:20px;
border-radius:24px;
}
.sample8 blockquote p {
color:#808080
}
.sample8 blockquote cite {
display: block;
padding-top:10px;
font-size: 0.8rem;
text-align: right;
color: #808080;
}
.sample9 blockquote{
position:relative;
background:#CDE7EE;
padding:20px;
}
.sample9 blockquote:before{
position:absolute;
left:5%;
top:-24px;
color:#3CAAB1;
box-sizing:border-box;
font-family:'FontAwesome';
content:'\f10d';
line-height:1;
padding-top:12px;
text-align:left;
font-size:40px;
}
.sample9 blockquote p {
color:#808080
}
.sample9 blockquote cite {
display: block;
border-top:1px dashed #FFFFFF;
padding-top:5px;
padding-bottom:5px;
font-size: 0.8rem;
text-align: right;
color: #808080;
}
.sample9 blockquote:after{
position:absolute;
right:5%;
bottom:-25px;
color:#3CAAB1;
box-sizing:border-box;
font-family:'FontAwesome';
content:'\f10e';
line-height:1;
padding-bottom:10px;
text-align:left;
font-size:40px;
}
.sample10 blockquote{
position:relative;
border-left:2px solid #A5CC80;
border-right:2px solid #A5CC80;
padding:20px;
background:#DDE8C2;
}
.sample10 blockquote:before{
position:absolute;
font-family:'FontAwesome';
content:'\f10d';
font-size: 28px;
color:#A5CC80;
top:5px;
left:10px;
}
.sample10 blockquote:after{
position:absolute;
font-family:'FontAwesome';
content:'\f10e';
font-size: 28px;
color:#A5CC80;
right:10px;
bottom:5px;
}
.sample10 blockquote cite {
display: block;
font-size: 0.8rem;
text-align: right;
color: #808080;
padding-right:20px;
}
Also see: Tab Triggers