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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.
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.
If the stylesheet 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 CSS 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.
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.
<!--Header class div to apply transparent white background to entire section-->
<div class="header">
<!--First Heading: Name-->
<h1>Emily Brooks</h1>
<!--Second Heading: Starts hidden:CSS transparent, on mouseover change to all black, onmouseout go back to initial coloring, books emojis volumes 1,2,3,& 4-->
<h2 id="subtitle" onmouseover="style.textShadow='0px 0px 0px #000000'" onmouseout="style.color='initial'">📕 📗lover of books 📘 📙 </h2>
</div>
<!--line break to separate the elements-->
<br>
<!--row and column layout-->
<div class="row">
<!--description "About Me" in the left column-->
<div class="column left description">
<p><strong>Emily F. Brooks</strong> is an assistant professor of digital culture and design at Coastal Carolina University. She received her PhD in English and graduate certificate in digital humanities from the University of Florida in August 2020. She is a "makeademic" and loves to tinker with technology. Her research focuses on digitizing nontraditional books including touch-and-feel books, interactive and movable books, and treasure bindings. She uses emerging technologies like photogrammetry, 3D scanning, and more to create virtual replicas of movable books. Her work in progress on digitizing movable books was featured in the fall 2016 issue of The American Scholar. She has presented on her work at DHSI, HASTAC, MLA, and SHARP. She has been recognized as both a HASTAC and NEH Summer Scholar, and was an invited guest speaker at the 2018 Movable Book Society Conference. She has also served as both the emerging technologies intern at the Marston Science Library and toy and movable books intern at the Baldwin Library of Historical Children's Literature. She has been leading Arduino workshops since Spring 2015, has co-authored the UF Library Guide to Arduinos, and has created Arduino video tutorials for Marston Science Library's YouTube channel. She particularly enjoys teaching book and media history, visual rhetoric and multimodal composition, and digital humanities.</p>
</div>
<!--Extras in the right column-->
<div class="column right extras">
<h3>Extras</h3>
<p>Move your mouse to hover below the title and find a secret message.</p>
<p>Once you find the secret message, click this button to change the message.</p>
<!--This button changes the subtitle on click-->
<button class="button" onclick="changeH2()">Reveal</button>
<p>Curious about the colors in the CSS animation?</p>
<!--This pops up a window alert with a gator emoji-->
<p onclick="window.alert('🐊 Go Gators!');">Blue/Orange</p>
<p onclick="window.alert('Where those of wit and learning will always find their kind- Ravenclaw');">Blue/Bronze</p>
<p onclick="window.alert('Coastal Carolina Chanticleers Faculty')">Teal/Bronze</p>
</div>
</div>
/*This applies the background image from GitHub to entire page and repeats*/
body {
background-image: url("https://makeademic.github.io/AboutMe/OQBK4443.jpeg");
}
/*I use the Google font link and add Stuff for <head> in Settings>HTML I also use the position sticky and apply the colormorph animation for 6s */
h1 {
text-align: center;
font-family: "Poppins", sans-serif;
font-weight: 100;
font-size: 6em;
animation-name: colormorph;
animation-duration: 6s;
position: sticky;
}
/*Start the color transparent and change in HTML onmouseover/onmouseout event*/
h2 {
color: transparent;
text-align: center;
font-family: "Poppins", sans-serif;
font-weight: 300;
font-size: 2em;
position:relative;
top:-40px;
}
/*Everything in header class has transparent background*/
.header {
background-color: rgba(255, 255, 255, 0.5);
}
/*Description class, background color is more opaque than header*/
.description {
background-color: rgba(255, 255, 255, 0.7);
font-family: "Poppins", sans-serif;
font-size: 1.5em;
}
.extras {
background-color: rgba(255, 255, 255, 0.7);
font-family: "Poppins", sans-serif;
font-size: 1.5em;
}
/*asterisk applies to entire page, using box-sizing for row/column layout*/
* {
box-sizing: border-box;
}
/* makes two unequal columns that float next to each other */
.column {
float: left;
padding: 10px;
margin: 10px;
}
.left {
width: 70%;
}
.right {
width: 20%;
}
/* Clear floats after the columns */
.row:after {
content: "";
display: table;
clear: both;
}
/*style the button so it's not default grey*/
.button{
background-color: #006f71; /* Teal */
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 1em;
border-radius:5px;
}
/*CSS animation keyframes start blue and orange, change to blue bronze, change to teal bronze, fade to transparent black*/
@keyframes colormorph {
0% {
color: #fa4616;
background-color: #0021a5;
}
25% {
color: #fa4616;
background-color: #0021a5;
}
50% {
color: #a27752;
background-color: #0021a5;
}
75% {
color: #a27752;
background-color: #006f71;
}
100% {
color: black;
background-color: transparent;
}
}
//This function changes the inner HTML of the subtitle from lover of books to creator codes with woman technologist emoji
function changeH2() { document.getElementById("subtitle").innerHTML = "👩🏻‍💻 Creator of Codes";
}
Also see: Tab Triggers