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.
</head><body>
<!-- PRIMARY CONTENT HOLDER --><div id="wrapper">
<!-- LOGO -->
<div id="logo">Lits Homepage</div>
<!-- END OF LOGO -->
<div id="internalwrapper">
<div id="tweets"><div id="tweets"><a class="twitter-timeline" href="https://twitter.com/Shadowed_Sin" data-widget-id="417922914403352576">Tweets by @Shadowed_Sin</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></div></div>
<!-- MAIN CONTAINER -->
<div id="ccentre"><div id="enter"><a href="#" class="buzz">Enter</a></div>
<p>[DUMMY TEXT - replace content or remove element] <a href="#">Link...</a> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin sit amet justo tortor. Vivamus in ultricies velit. Sed augue tortor, mattis ut lorem in, lobortis malesuada ex. Fusce feugiat, eros id porta gravida, sem lectus commodo nisl, quis blandit metus arcu dignissim eros. Vestibulum accumsan ligula a tellus iaculis, et pulvinar nisi ullamcorper. Praesent condimentum, felis ac iaculis elementum, magna arcu facilisis augue, sit amet viverra orci eros et elit. Quisque et porttitor lectus. Aliquam eu porta risus. Etiam tincidunt gravida dui, eget fringilla tellus commodo et. Ut volutpat vehicula neque vitae feugiat. Ut mattis arcu ut tortor lobortis aliquet. Ut ut faucibus urna. Etiam ac lectus efficitur, cursus urna et, porttitor ante.</p>
<div class="dbutt"><div class="button"><a href="#" class="pulse-grow">Wiki</a></div><div class="button"><a href="#" class="pulse-grow">Staff</a></div><div class="button"><a href="#" class="pulse-grow">Blog</a></div></div>
<div id="sbx"><!-- BEGIN CBOX - www.cbox.ws - v4.3 -->
<div id="cboxdiv" style="position: relative; margin: 0 auto; width: auto; font-size: 0; line-height: 0;">
<div style="position: relative; height: 250px; overflow: auto; overflow-y: auto; -webkit-overflow-scrolling: touch; border: 0px solid;"><iframe src="http://www5.cbox.ws/box/?boxid=763333&boxtag=5bhycz&sec=main" marginheight="0" marginwidth="0" frameborder="0" width="auto" height="100%" scrolling="auto" allowtransparency="yes" name="cboxmain5-763333" id="cboxmain5-763333"></iframe></div>
<div style="position: relative; height: 120px; overflow: hidden; border: 0px solid; border-top: 0px;"><iframe src="http://www5.cbox.ws/box/?boxid=763333&boxtag=5bhycz&sec=form" marginheight="0" marginwidth="0" frameborder="0" width="auto" height="100%" scrolling="no" allowtransparency="yes" name="cboxform5-763333" id="cboxform5-763333"></iframe></div>
</div>
<!-- END CBOX --> </div>
<!-- END OF CONTAINER --></div>
</div><!-- END OF INTERNALWRAPPER -->
</div><!-- END OF PRIMARY CONTENT HOLDER -->
<!-- CODING & DESIGN CREDIT - PLEASE DON'T REMOVE -->
<div id="thanks">Lits Homepage Coded & Designed by <a href="http://draebox.com" target="_blank" rel="license">Draebox.com</a></div>
</body></html>
@import url(https://fonts.googleapis.com/css?family=Megrim|Iceland);
/* LITS SPLASH PAGE 4 BY DRAEBOX.COM, 2015. UPDATED SEPTEMBER 2015 TO INCLUDE FLEX TECHNOLOGY. */
body {
background: #212136;
color: #bbbbc8;
font-size: 100%;
font-family: 'Iceland', cursive;
margin: 0px;
padding: 0px;
width: 100%;
height:100%;
border: 0px;
word-wrap: break-word;
}
#logo {
font-family: 'Megrim', cursive;
font-size: 3em;
color: #fff;
text-shadow: 1px 1px 8px #6cc9f1;
margin: 56px auto 26px;
text-align: center;
}
#logo a,#logo a:visited,#logo a:hover,#logo a:active {
color: #fff;
text-decoration: none;
}
a,a:visited,a:active {
color: #fff;
text-decoration: none;
font-weight: bold;
}
a:hover {
text-decoration: none;
font-weight: bold;
color: #6cc9f1;
}
/* VARIOUS CONTENT CONTAINERS */
#wrapper { /* MAIN & VISUAL WRAPPER */
max-width: 1820px;
margin: 0px auto 4px;
border: 1px solid #000;
background: url(http://skins.draebox.com/images/lits/lits3_wrapper.png) no-repeat top center #0b1940;
padding: 0px;
}
#internalwrapper {
max-width: 1800px;
background: #060d1f;
padding: 0px;
margin: 2px auto 2px;
border: 1px solid #000;
opacity: 0.6;
display: flex; /* SEPT 2015 FLEX TECH */
flex-flow: row wrap; /* SEPT 2015 FLEX TECH */
justify-content: center; /* SEPT 2015 FLEX TECH */
align-items: stretch; /* SEPT 2015 FLEX TECH - ALTERNATIVE: CENTER */
align-content: stretch; /* SEPT 2015 FLEX TECH - ALTERNATIVES: SPACE-BETWEEN OR SPACE-AROUND */
flex: 1 100%;
}
#ccentre {
background: transparent;
border: none;
padding: 4px;
padding-bottom: 4px;
margin: auto; /* 50px 12% 10px 12%; */
width: auto;
display: flex-inline; /* SEPT 2015 FLEX TECH */
flex: 1 100%; /* SEPT 2015 FLEX TECH */
}
#tweets {
background: transparent;
padding: 12px;
display: flex-inline;
position:left;
/* margin-left: 12px; */
/* margin-top: 22px; */
margin: auto;
width: auto;
padding: 4px;
height: 100%;
border: none;
font-size: 1.600em; /* RESPONSIVE TEXT SIZE */
line-height: 1em; /* This keeps the line height proportional to the font size */
display: inline-flex; /* SEPT 2015 FLEX TECH */
flex: 1 100%; /* SEPT 2015 FLEX TECH */
}
/* SHOUTBOX OPTION - RIGHT SIDE OF MAIN CONTAINER */
#sbx {
background: transparent;
padding: 12px;
position: right;
/* margin-right: 12px; */
margin-top: 22px; */
margin: auto;
width: auto;
padding: 4px;
height: 100%;
border: none;
font-size: 1.600em; /* RESPONSIVE TEXT SIZE */
line-height: 1em; /* This keeps the line height proportional to the font size */
display: inline-flex; /* SEPT 2015 FLEX TECH */
flex: 1 100%; /* SEPT 2015 FLEX TECH */
}
/* SECONDARY SHOUTBOX OPTION - ABOVE OR BELOW MAIN CONTENT */
#shoutbox {
background: #3a3a52;
padding: 4px;
margin: 10px 230px 10px 230px;
border: 2px solid #000; width: auto;
font-size: 1.600em; /* RESPONSIVE TEXT SIZE */
line-height: 1em; /* This keeps the line height proportional to the font size */
}
.newsbox {
line-height: 1.2;
text-align: left;
padding: 6px;
color: #222;
margin: 16px;
width: auto;
background: #bed994;
font-size: 1.600em; /* RESPONSIVE TEXT SIZE */
line-height: 1em; /* This keeps the line height proportional to the font size */
}
.newsbox a,.newsbox a:active,.newsbox a:visited {
color: #000;
}
.newsbox a:hover {
color: 212136;
}
.newsbox em {
color: #3377b1;
}
p {
margin: 16px 12px 26px;
font-size: 1.600em; /* RESPONSIVE TEXT SIZE */
line-height: 1em; /* This keeps the line height proportional to the font size */
width: auto;
display: inline-flex; /* SEPT 2015 FLEX TECH */
}
h1,h2,h3,h4,h5 {
font-family: 'Megrim', cursive;
text-align: left;
color: #fff;
border-bottom: 1px solid #f5f5f5;
width: 100%;
}
h1 {
font-size: 3em;
margin: 36px 6px 16px;
}
h2 {
font-size: 2.600em;
margin: 30px 6px 16px;
}
h3 {
font-size: 2.300em;
margin: 30px 6px 16px;
}
h4 {
font-size: 1.800em;
margin: 20px 6px 16px;
}
h5 {
font-size: 1.400em;
margin: 16px 6px 16px;
}
sub {
color: #606074;
text-transform: uppercase;
font-style: italic;
margin: 36px 6px 16px;
}
em {
color: #bed994;
font-weight: bold;
}
/* TABLE ELEMENTS */
table {
margin: 16px 16px 20px;
background: #000;
padding: 2px;
width: auto;
}
.cats {
background: #171735;
line-height: 1.6;
text-align: center;
font-weight: bold;
font-family: 'Megrim', cursive;
font-size: 24px;
width: 100%;
margin: 0px;
padding: 4px;
}
th {
background: #2b2b4e;
text-transform: uppercase;
font-size: 10px;
text-align: center;
padding: 4px;
margin: 0px;
max-width: auto;
}
td {
background: #555582;
text-align: left;
padding: 4px;
margin: 0px;
max-width: 50%;
}
hr {
height: 1px;
border: none;
background: #bed994;
}
/* IMAGE STUFF */
img {
border: 1px solid #1px solid #000;
max-width: 50%;
margin: 12px;
}
.left {
float: left;
}
.right {
float: right;
}
.quote {
background: #d1d1d9;
margin: 16px;
padding: 16px;
font-style: italic;
color: #222;
}
/* BUTTONS */
.button,
.button:visited,
button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
background: #222;
color: #fff;
display: inline-block;
text-decoration: none;
letter-spacing: 0;
padding: 12px 20px;
margin-bottom: 18px;
margin-right: 4px;
border: 1px solid #000;
cursor: pointer;
height: auto;
text-transform: uppercase;
letter-spacing: 2px;
-webkit-transition: all .2s ease-in-out;
-moz-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
-ms-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
}
.button:hover,
button:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover {
background: #000;
color: #fff;
}
.button:active,
button:active,
input[type="submit"]:active,
input[type="reset"]:active,
input[type="button"]:active {
background: #7A5B8F;
color: #fff;
}
.button.full-width,
button.full-width,
input[type="submit"].full-width,
input[type="reset"].full-width,
input[type="button"].full-width {
width: 100%;
padding-left: 0 !important;
padding-right: 0 !important;
text-align: center;
}
.dbutt {
text-align: center;
margin: auto auto;
width: auto;
height: auto;
flex: 1 100%; /* SEPT 2015 FLEX TECH */
}
#enter {
font-family: 'Megrim', cursive;
font-size: 100px;
color: #fff;
margin: auto auto;
text-align: center;
flex: 1 100%; /* SEPT 2015 FLEX TECH */
}
#thanks {
margin: 10px auto 10px;
text-align: center;
color: #f5f5f5;
text-transform: uppercase;
font-size: 14px;
}
@media screen and (max-width: 30em) {
body {
font-size: 90%;
}
}
@media screen and (max-width: 20em) {
body {
font-size: 80%;
}
}
Also see: Tab Triggers