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='box'>
<div class='header'>
<div class='title'>
<p>Edit Away Message</p>
</div>
<div class='close'>
<p>X</p>
</div>
</div>
<div class='enter-label'>
<div class='text-label'>
<p>Enter label:</p>
</div>
<div class='lol-extra-border'>
<div class='dropdown'>
<input type='text' value='not here rn'>
<div class='caret-box'>
<span class='caret'></span>
</div>
</div>
</div>
</div>
<div class='msg-label'>
<p>Enter new Away message:</p>
</div>
<div class='customize-row'>
<div class='blue-a-box'>
<p class='text-blue'>A</p>
<p class='background-blue'>A</p>
</div>
<div class='size-a-box'>
<p class='small-a'>A</p>
<p class='medium-a'>A</p>
<p class='large-a'>A</p>
</div>
<div class='bold-box'>
<p class='bold-text'>B</p>
<p class='italic-text'>I</p>
<p class='underline-text'>u</p>
</div>
<div class='link-box'>
<p class='link-text'>link</p>
<img src="http://www.jesush.com/wp-content/uploads/2008/07/happy10.gif">
</div>
</div>
<div class='text-box'>
<textarea rows="4">I am away from my computer right now. ....eatin lunch hmu on my cell</textarea>
</div>
<div class='special-characters'>
<p>Special Characters:</p>
<p>%n = Screen Name of Buddy</p>
<p class='why'>%d = Current date</p>
<div class='clear'>
<p class='left'>
%t = Current time
</p>
<p class='right'>
Save for later use
<input type="checkbox">
</p>
</div>
</div>
<div class='bottom-buttons'>
<button>I'm Away</button>
<button>Cancel</button>
</div>
</div> <!-- end box -->
@mixin tahoma
font-family: 'Tahoma'
@mixin box-shadow-dark
box-shadow: 1px 1px 1px #424242
@mixin button-border
border-top: 1px solid white
border-left: 1px solid white
border-right: 1px solid #848484
border-bottom: 1px solid #848484
@mixin hover
&:hover
cursor: pointer
.caret
display: inline-block
width: 0
height: 0
margin-left: 2px
margin-top: 12px
vertical-align: middle
border-top: 6px dashed
border-top: 6px solid\9
border-right: 6px solid transparent
border-left: 6px solid transparent
.box
width: 400px
height: 430px
border: 1px solid gray
background: #d6d6ce
margin: 20px auto
position: relative
padding: 1px
+button-border
+box-shadow-dark
.header
background: #08216b /* For browsers that do not support gradients */
background: -webkit-linear-gradient(left, #08216b , #a5c6ef) /* For Safari 5.1 to 6.0 */
background: -o-linear-gradient(right, #08216b, #a5c6ef) /* For Opera 11.1 to 12.0 */
background: -moz-linear-gradient(right, #08216b, #a5c6ef) /* For Firefox 3.6 to 15 */
background: linear-gradient(to right, #08216b , #a5c6ef) /* Standard syntax (must be last) */
height: 35px
clear: both
.title
font-family: 'Tahoma', serif
color: white
font-size: 12px
font-weight: bold
float: left
line-height: 0px
margin: 4px 5px
.close
padding: 0px 8px
font-family: 'Arial'
color: black
font-weight: 700
background: #d6d6ce
float: right
line-height: 0px
font-size: 12px
margin: 4px
border-top: 1px solid white
border-left: 1px solid white
border-right: 1px solid #848484
border-bottom: 1px solid #848484
box-shadow: 1px 1px 1px #424242
&:hover
cursor: pointer
.enter-label
clear: both
line-height: 0px
height: 50px
.text-label
float: left
+tahoma
font-size: 14px
font-weight: 300
margin: 25px 0px 20px 30px
/* ignore my silly class names hehe */
.lol-extra-border
border-top: 1px solid #848484
border-left: 1px solid #848484
border-right: 1px solid white
border-bottom: 1px solid white
input
float: right
font-family: 'Arial'
font-weight: 300
background: white
padding: 2px
width: 220px
height: 25px
margin: 23px 30px
position: relative
border-top: 2px solid #424242
border-left: 2px solid #424242
border-right: 2px solid #d6d6ce
border-bottom: 2px solid #d6d6ce
.caret-box
position: absolute
top: 62px
right: 36px
height: 26px
background: #d6d6ce
+button-border
+box-shadow-dark
padding: 0px 4px
+hover
.msg-label
+tahoma
margin: 40px 30px 10px
font-size: 14px
white-space: nowrap
/* tbh i know i could've used flexbox or a UL here but i didn't so w/e */
.customize-row
height: 30px
border: 1px solid white
outline: 1px solid #848484
margin: 0px 30px
.blue-a-box
margin-top: -10px
width: 70px
font-family: 'Times New Roman'
.text-blue
font-weight: bolder
color: #0000ff
margin: 0px 10px
display: inline-block
.background-blue
font-weight: bolder
color: #d6d6ce
background: #0000ff
padding: 0px 5px
display: inline-block
.size-a-box
margin-top: -34px
margin-left: 72px
border-left: 1px solid white
border-right: 1px solid #848484
width: 100px
box-shadow: -1px 0px 0px #848484
.small-a, .medium-a, .large-a
font-weight: bold
display: inline-block
margin: -10px 8px
font-family: 'Times New Roman'
.small-a
font-size: 12px
.medium-a
font-size: 16px
.large-a
font-size: 19px
.bold-box
margin-top: -19px
margin-left: 174px
border-left: 1px solid white
border-right: 1px solid #848484
width: 85px
.bold-text, .italic-text, .underline-text
display: inline-block
margin: -10px 8px
font-family: 'Times New Roman'
.bold-text
font-weight: bold
.italic-text
font-style: italic
font-size: 18px
.underline-text
text-decoration: underline
font-size: 19px
.link-box
margin-top: -20px
margin-left: 261px
border-left: 1px solid white
width: 75px
.link-text, img
margin: -10px 10px
.link-text
font-weight: bold
color: #0000ff
text-decoration: underline
font-size: 12px
display: inline-block
margin-top: -3px
img
display: inherit
margin: -18px 0px 0px 42px
width: 25%
.text-box
textarea
margin: 2px 30px
width: 334px
font-family: 'Times New Roman'
font-size: 16px
resize: none
-webkit-font-smoothing: antialiased
text-shadow: 1px 1px 1px rgba(0,0,0,0.004)
border-top: 1px solid #848484
border-left: 1px solid #848484
border-bottom: 1px solid #d6d6ce
border-right: 1px solid #d6d6ce
outline: 1px solid white
.special-characters
+tahoma
font-size: 14px
margin: 20px 30px
p
line-height: 8px
.why
margin-bottom: 0px
.clear
clear: both
.left
float: left
.right
float: right
margin-top: 10px
.bottom-buttons
width: 400px
text-align: center
margin: 5px auto
display: inline-block
button
+tahoma
font-size: 14px
width: 100px
height: 30px
background: #d6d6ce
+button-border
+box-shadow-dark
&:hover
cursor: pointer
// check this out on http://awaymessag.es and edit the msg and stuff if you wanna
Also see: Tab Triggers