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.
<form>
<input type="text" style="font-family: 'Hiragino Sans W0';" placeholder="ヒラギノ角ゴシック W0">
<input type="text" style="font-family: 'Hiragino Sans W1';" placeholder="ヒラギノ角ゴシック W1">
<input type="text" style="font-family: 'Hiragino Sans W2';" placeholder="ヒラギノ角ゴシック W2">
<input type="text" style="font-family: 'Hiragino Sans W3';" placeholder="ヒラギノ角ゴシック W3">
<input type="text" style="font-family: 'Hiragino Sans W4';" placeholder="ヒラギノ角ゴシック W4">
<input type="text" style="font-family: 'Hiragino Sans W5';" placeholder="ヒラギノ角ゴシック W5">
<input type="text" style="font-family: 'Hiragino Sans W6';" placeholder="ヒラギノ角ゴシック W6">
<input type="text" style="font-family: 'Hiragino Sans W7';" placeholder="ヒラギノ角ゴシック W7">
<input type="text" style="font-family: 'Hiragino Sans W8';" placeholder="ヒラギノ角ゴシック W8">
<input type="text" style="font-family: 'Hiragino Sans W9';" placeholder="ヒラギノ角ゴシック W9">
<input type="text" style="font-family: 'ヒラギノ明朝 ProN W3';" placeholder="ヒラギノ明朝 ProN W3">
<input type="text" style="font-family: 'ヒラギノ明朝 ProN W6';" placeholder="ヒラギノ明朝 ProN W6">
<input type="text" style="font-family: 'ヒラギノ丸ゴ ProN W4';" placeholder="ヒラギノ丸ゴ ProN W4">
<input type="text" style="font-family: 'Klee Medium';" placeholder="クレー M">
<input type="text" style="font-family: 'Klee DemiBold';" placeholder="クレー DB">
<input type="text" style="font-family: '游ゴシック ミディアム';" placeholder="游ゴシック ミディアム">
<input type="text" style="font-family: '游ゴシック ボールド';" placeholder="游ゴシック ボールド">
<input type="text" style="font-family: '游明朝 ミディアム';" placeholder="游明朝 ミディアム">
<input type="text" style="font-family: '游明朝 デミボールド';" placeholder="游明朝 デミボールド">
<input type="text" style="font-family: '游明朝体+36ポかな ミディアム';" placeholder="游明朝体+36ポかな ミディアム">
<input type="text" style="font-family: '游明朝体+36ポかな デミボールド';" placeholder="游明朝体+36ポかな デミボールド">
<input type="text" style="font-family: '築紫A丸ゴシック レギュラー';" placeholder="築紫A丸ゴシック レギュラー">
<input type="text" style="font-family: '築紫A丸ゴシック ボールド';" placeholder="築紫A丸ゴシック ボールド">
<input type="text" style="font-family: '築紫B丸ゴシック レギュラー';" placeholder="築紫B丸ゴシック レギュラー">
<input type="text" style="font-family: '築紫B丸ゴシック ボールド';" placeholder="築紫B丸ゴシック ボールド">
<input type="text" style="font-family: 'Noto Sans CJK JP Thin';" placeholder="Noto Sans CJK JP Thin">
<input type="text" style="font-family: 'Noto Sans CJK JP Light';" placeholder="Noto Sans CJK JP Light">
<input type="text" style="font-family: 'Noto Sans CJK JP DemiLight';" placeholder="Noto Sans CJK JP DemiLight">
<input type="text" style="font-family: 'Noto Sans CJK JP Regular';" placeholder="Noto Sans CJK JP Regular">
<input type="text" style="font-family: 'Noto Sans CJK JP Medium';" placeholder="Noto Sans CJK JP Medium">
<input type="text" style="font-family: 'Noto Sans CJK JP Bold';" placeholder="Noto Sans CJK JP Bold">
<input type="text" style="font-family: 'Noto Sans CJK JP Black';" placeholder="Noto Sans CJK JP Black">
<input type="text" style="font-family: 'M+ 1c thin';" placeholder="M+ 1c thin">
<input type="text" style="font-family: 'M+ 1c light';" placeholder="M+ 1c light">
<input type="text" style="font-family: 'M+ 1c regular';" placeholder="M+ 1c regular">
<input type="text" style="font-family: 'M+ 1c medium';" placeholder="M+ 1c medium">
<input type="text" style="font-family: 'M+ 1c bold';" placeholder="M+ 1c bold">
<input type="text" style="font-family: 'M+ 1c heavy';" placeholder="M+ 1c heavy">
<input type="text" style="font-family: 'M+ 1c black';" placeholder="M+ 1c black">
<input type="text" style="font-family: 'M+ 2c thin';" placeholder="M+ 2c thin">
<input type="text" style="font-family: 'M+ 2c light';" placeholder="M+ 2c light">
<input type="text" style="font-family: 'M+ 2c regular';" placeholder="M+ 2c regular">
<input type="text" style="font-family: 'M+ 2c medium';" placeholder="M+ 2c medium">
<input type="text" style="font-family: 'M+ 2c bold';" placeholder="M+ 2c bold">
<input type="text" style="font-family: 'M+ 2c heavy';" placeholder="M+ 2c heavy">
<input type="text" style="font-family: 'M+ 2c black';" placeholder="M+ 2c black">
<input type="text" style="font-family: 'M+ 1p thin';" placeholder="M+ 1p thin">
<input type="text" style="font-family: 'M+ 1p light';" placeholder="M+ 1p light">
<input type="text" style="font-family: 'M+ 1p regular';" placeholder="M+ 1p regular">
<input type="text" style="font-family: 'M+ 1p medium';" placeholder="M+ 1p medium">
<input type="text" style="font-family: 'M+ 1p bold';" placeholder="M+ 1p bold">
<input type="text" style="font-family: 'M+ 1p heavy';" placeholder="M+ 1p heavy">
<input type="text" style="font-family: 'M+ 1p black';" placeholder="M+ 1p black">
<input type="text" style="font-family: 'M+ 2p thin';" placeholder="M+ 2p thin">
<input type="text" style="font-family: 'M+ 2p light';" placeholder="M+ 2p light">
<input type="text" style="font-family: 'M+ 2p regular';" placeholder="M+ 2p regular">
<input type="text" style="font-family: 'M+ 2p medium';" placeholder="M+ 2p medium">
<input type="text" style="font-family: 'M+ 2p bold';" placeholder="M+ 2p bold">
<input type="text" style="font-family: 'M+ 2p heavy';" placeholder="M+ 2p heavy">
<input type="text" style="font-family: 'M+ 2p black';" placeholder="M+ 2p black">
<input type="text" style="font-family: 'AXIS Std EL';" placeholder="AXIS Std EL">
<input type="text" style="font-family: 'AXIS Std L';" placeholder="AXIS Std L">
<input type="text" style="font-family: 'AXIS Std R';" placeholder="AXIS Std R">
<input type="text" style="font-family: 'AXIS Std M';" placeholder="AXIS Std M">
<input type="text" style="font-family: 'AXIS Std B';" placeholder="AXIS Std B">
<button type="reset">リセット</button>
<a name="bottom"></a>
<a href="#bottom" class="bottom"></a>
</form>
@font-face {
font-family: "Hiragino Sans W0";
src: local(HiraginoSans-W0);
}
@font-face {
font-family: "Hiragino Sans W1";
src: local(HiraginoSans-W1);
}
@font-face {
font-family: "Hiragino Sans W2";
src: local(HiraginoSans-W2);
}
@font-face {
font-family: "Hiragino Sans W3";
src: local(HiraginoSans-W3);
}
@font-face {
font-family: "Hiragino Sans W4";
src: local(HiraginoSans-W4);
}
@font-face {
font-family: "Hiragino Sans W5";
src: local(HiraginoSans-W5);
}
@font-face {
font-family: "Hiragino Sans W6";
src: local(HiraginoSans-W6);
}
@font-face {
font-family: "Hiragino Sans W7";
src: local(HiraginoSans-W7);
}
@font-face {
font-family: "Hiragino Sans W8";
src: local(HiraginoSans-W8);
}
@font-face {
font-family: "Hiragino Sans W9";
src: local(HiraginoSans-W9);
}
@font-face {
font-family: "Klee Medium";
src: local(Klee-Medium);
}
@font-face {
font-family: "Klee DemiBold";
src: local(Klee-DemiBold);
}
@font-face {
font-family: "游ゴシック ミディアム";
src: local(YuGo-Medium);
}
@font-face {
font-family: "游ゴシック ボールド";
src: local(YuGo-Bold);
}
@font-face {
font-family: "游明朝 ミディアム";
src: local(YuMin-Medium);
}
@font-face {
font-family: "游明朝 デミボールド";
src: local(YuMin-DemiBold);
}
@font-face {
font-family: "游明朝体+36ポかな ミディアム";
src: local(YuMin_36pKn-Medium);
}
@font-face {
font-family: "游明朝体+36ポかな デミボールド";
src: local(YuMin_36pKn-DemiBold);
}
@font-face {
font-family: "築紫A丸ゴシック レギュラー";
src: local(TsukuARdGothic-Regular);
}
@font-face {
font-family: "築紫A丸ゴシック ボールド";
src: local(TsukuARdGothic-Bold);
}
@font-face {
font-family: "築紫B丸ゴシック ボールド";
src: local(TsukuBRdGothic-Bold);
}
@font-face {
font-family: "築紫B丸ゴシック レギュラー";
src: local(TsukuBRdGothic-Regular);
}
@font-face {
font-family: "ヒラギノ明朝 ProN W3";
src: local(HiraMinProN-W3);
}
@font-face {
font-family: "ヒラギノ明朝 ProN W6";
src: local(HiraMinProN-W6);
}
@font-face {
font-family: "ヒラギノ丸ゴ ProN W4";
src: local(HiraMaruProN-W4);
}
@font-face {
font-family: "Noto Sans CJK JP Thin";
src: local(NotoSansCJKjp-Thin);
}
@font-face {
font-family: "Noto Sans CJK JP Light";
src: local(NotoSansCJKjp-Light);
}
@font-face {
font-family: "Noto Sans CJK JP DemiLight";
src: local(NotoSansCJKjp-DemiLight);
}
@font-face {
font-family: "Noto Sans CJK JP Regular";
src: local(NotoSansCJKjp-Regular);
}
@font-face {
font-family: "Noto Sans CJK JP Medium";
src: local(NotoSansCJKjp-Medium);
}
@font-face {
font-family: "Noto Sans CJK JP Bold";
src: local(NotoSansCJKjp-Bold);
}
@font-face {
font-family: "Noto Sans CJK JP Black";
src: local(NotoSansCJKjp-Black);
}
@font-face {
font-family: "M+ 1c light";
src: local(mplus-1c-light);
}
@font-face {
font-family: "M+ 1c thin";
src: local(mplus-1c-thin);
}
@font-face {
font-family: "M+ 1c regular";
src: local(mplus-1c-regular);
}
@font-face {
font-family: "M+ 1c medium";
src: local(mplus-1c-medium);
}
@font-face {
font-family: "M+ 1c bold";
src: local(mplus-1c-bold);
}
@font-face {
font-family: "M+ 1c black";
src: local(mplus-1c-black);
}
@font-face {
font-family: "M+ 1c heavy";
src: local(mplus-1c-heavy);
}
@font-face {
font-family: "M+ 2c light";
src: local(mplus-2c-light);
}
@font-face {
font-family: "M+ 2c thin";
src: local(mplus-2c-thin);
}
@font-face {
font-family: "M+ 2c regular";
src: local(mplus-2c-regular);
}
@font-face {
font-family: "M+ 2c medium";
src: local(mplus-2c-medium);
}
@font-face {
font-family: "M+ 2c bold";
src: local(mplus-2c-bold);
}
@font-face {
font-family: "M+ 2c black";
src: local(mplus-2c-black);
}
@font-face {
font-family: "M+ 2c heavy";
src: local(mplus-2c-heavy);
}
@font-face {
font-family: "M+ 1p light";
src: local(mplus-1p-light);
}
@font-face {
font-family: "M+ 1p thin";
src: local(mplus-1p-thin);
}
@font-face {
font-family: "M+ 1p regular";
src: local(mplus-1p-regular);
}
@font-face {
font-family: "M+ 1p medium";
src: local(mplus-1p-medium);
}
@font-face {
font-family: "M+ 1p bold";
src: local(mplus-1p-bold);
}
@font-face {
font-family: "M+ 1p black";
src: local(mplus-1p-black);
}
@font-face {
font-family: "M+ 1p heavy";
src: local(mplus-1p-heavy);
}
@font-face {
font-family: "M+ 2p light";
src: local(mplus-2p-light);
}
@font-face {
font-family: "M+ 2p thin";
src: local(mplus-2p-thin);
}
@font-face {
font-family: "M+ 2p regular";
src: local(mplus-2p-regular);
}
@font-face {
font-family: "M+ 2p medium";
src: local(mplus-2p-medium);
}
@font-face {
font-family: "M+ 2p bold";
src: local(mplus-2p-bold);
}
@font-face {
font-family: "M+ 2p black";
src: local(mplus-2p-black);
}
@font-face {
font-family: "M+ 2p heavy";
src: local(mplus-2p-heavy);
}
@font-face {
font-family: "AXIS Std EL";
src: local(AxisStd-ExtraLight);
}
@font-face {
font-family: "AXIS Std L";
src: local(AxisStd-Light);
}
@font-face {
font-family: "AXIS Std R";
src: local(AxisStd-Regular);
}
@font-face {
font-family: "AXIS Std M";
src: local(AxisStd-Medium);
}
@font-face {
font-family: "AXIS Std B";
src: local(AxisStd-Bold);
}
input{
font-size: 2.2rem;
border: none;
background: #fff;
width: 100%;
border-bottom: dashed 2px #ccc;
padding: 0.5rem 0 0.5rem 0;
}
input::-moz-selection {
background-color: #999;
color: #fff;
}
input[type=text]::-moz-placeholder {
color: #000000;
}
button {
font-size: 2rem;
margin-top: 1rem;
background-color: #333;
border: dashed 2px #333;
border-radius: 8px;
color: #fff;
width: 100%;
padding: 0.4rem 0 0.4rem 0;
font-weight: 200;
font-family: "Hiragino Sans";
transition: .4s;
}
button:hover {
background-color: #222;
}
.bottom {
position: fixed;
display: block;
width: 4rem;
height: 4rem;
background-color: #fff;
border: solid 2px #444;
font-family: "Material Icons";
font-size: 4rem;
bottom: 0;
right: 0;
margin: 0 0.5rem 0.5rem 0;
text-align: center;
color: #333;
vertical-align: top;
text-decoration: none;
border-radius: 8px;
padding-top: 0px;
}
Also see: Tab Triggers