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.
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RIP Steve Jobs</title>
<link rel="stylesheet" href="tribute-style.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.12.1/css/all.css" crossorigin="anonymous">
</head>
<body>
<div class="container" id="main">
<div class="dark-mode-toggle">
<button class="dark-btn" id="dark-btn" onClick="darkMode()">
<i class="dark-icon fa fa-moon" id="dark-icon" title="Dark mode Toggle"></i>
</button>
</div>
<div class="content-wrap" id="title">
<h1>Steve Jobs</h1>
<h3>Stay Hungry Stay Foolish</h3>
</div>
<div class="img-container">
<img src="https://source.unsplash.com/collection/27383063/1600x900" alt="Steve Jobs Glasses and Steve Jobs Photos" id="#img">
<p id="#img-text">Steve Jobs: the man behind iWorld!</p>
</div>
<section class="timeline">
<h3>Here's a timeline of Job's Extraordinary Life</h3>
<ul class="timeline-item">
<li><strong>1955</strong> Steven Paul Jobs is born in San Francisco to Joanne Carole Schieble and Abdulfattah Jandali.</li>
<li><strong>1977</strong> Co-founds Apple Computer with Wozniak and Ronald Wayne.
That same year, the company sells the Apple I in the form of a kit that sells for $666.66.
</li>
<li><strong>1984</strong>
Two days after the $1.5 million Ridley Scott-directed "1984" Super Bowl commercial airs,
introduces the Macintosh to much fanfare during Apple's shareholder meeting.
"For the first time ever, I'd like to let Macintosh speak for itself."
The computer's voice then says, "Never trust a computer you can't lift."
Macintosh becomes the first commercially successful small computer with a graphical user interface.
</li>
<li><strong>1985</strong>
CEO John Sculley engineers Jobs' ouster from Apple.
Jobs resigns as Apple chairman, saying in a board meeting,
"I've been thinking a lot, and it's time for me to get on with my life.
It's obvious that I've got to do something. I'm 30 years old." Soon thereafter,
Jobs starts NeXT Computer (which later becomes NeXT Software),
funded by selling $70 million of his Apple stock. An "interpersonal" NeXT workstation,
sporting a built-in Ethernet port,
is used by Tim Berners-Lee at CERN to become the first server of the World Wide We
</li>
<li><strong>1995</strong>
Becomes Pixar's president and CEO. Later in the year,
Jobs brings Pixar pubic one week after the release of "Toy Story,"
with Tom Hanks doing the voice of Woody and Tim Allen as Buzz Lightyear. The film earns $192 million at the box office.
Its success helps make it
quite attractive for celebrities to lend their voices to animated characters.
</li>
<li><strong>1996</strong>
Returns to Apple, as an adviser, after it buys NeXT for $429 million.
</li>
<li><strong>1997</strong>
Apple buy NeXT for $427 million, bringing Jobs back to the company he had cofounded
</li>
<li><strong>2008</strong>
Introduces the App Store as an update to iTunes. Also introduces the MacBook Air.
The App Store facilitated 18 billion app downloads as of October 4, 2011.
</li>
<li><strong>2011</strong>
Jobs announce his resignation as Apple’s CEO due to his cancer. He named Tim Cook as his successor.
</li>
<li>
<strong>2011</strong>
Gives a keynote speech at Apple's Worldwide Developers Conference, it's Jobs'
last public appearance at an Apple event.
</li>
</ul>
</section>
<section class="quote-wrapper" id="citation">
<blockquote>
<q>Your time is limited, so don't waste it living someone else's life.</q>
</blockquote>
<cite>- Steve Jobs</cite>
</section>
<footer>
<h2>If you have time, you should read more about this incredible human being on his <a href="https://en.wikipedia.org/wiki/Steve_Jobs" target="_blank">Wikipedia entry.</a></h2>
</footer>
</div>
<script src="tribute-script.js"></script>
</body>
</html>
@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap');
* {
box-sizing: border-box;
padding: 0;
margin: 0;
}
body {
font-family: 'Roboto Condensed';
background-color: #eee;
}
img {
max-width: 100%;
}
#main {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding:4rem 3rem ;
}
#title {
display: flex;
flex-direction: column;
align-items: center;
padding:3rem;
}
.content-wrap h1 {
font-size: 4rem;
}
.img-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding:2rem;
background-color: #fff;;
}
.img-container p {
display: inline-block;
margin:20px;
}
.timeline {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding:4rem;
gap:1rem;
}
.timeline-item li {
padding:1rem;
}
#citation {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
#citation p {
font-size: 2em;
font-weight: 300;
font-style: italic;
letter-spacing: 0.01em;
}
cite {
font-size: 1.250em;
}
footer {
margin-top:2rem;
}
footer a {
text-decoration: none;
}
section ul {
list-style: none;
border-left: 2px solid blue;
}
blockquote q {
font-size:1.5rem;
}
.dark-mode {
color: #eee;
background: #121212;
}
.dark-mode a {
color: #809fff;
}
.dark-mode blockquote p::before,
.dark-mode blockquote p::after
{
color:#eee;
}
.dark-mode .dark-btn {
background-color: #121212;
}
.dark-mode .img-container {
background-color: grey;
}
.dark-btn {
border: none; /* Remove borders */
color: grey; /* White text */
padding: 12px 16px; /* Some padding */
font-size: 24px; /* Set a font size */
cursor: pointer; /* Mouse poi
tnter on hover */
}
.timeline-item li::before{
content: '';
display:inline-block;
position:relative;
left:-25px;
width: 15px;
height: 15px;
-moz-border-radius: 7.5px;
-webkit-border-radius: 7.5px;
border-radius: 7.5px;
background-color: #69b6d5;
}
strong {
font-size:20px;
}
@media all and (max-width:40rem) {
blockquote {
display:flex;
flex-direction:column;
max-width:320px;
}
}
function darkMode() {
let element = document.body;
let icon=document.getElementById("dark-icon");
let button=document.getElementById("dark-btn");
element.classList.toggle("dark-mode");
icon.classList.toggle("fa-sun")
button.title="Toggle Light Mode"
}
Also see: Tab Triggers