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.
<!-- **TO TEST- Uncomment the script below
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script> -->
<!DOCTYPE html>
<html lang="en-US">
<div id="main">
<div>
<h1 id="title" class="card">Tribute to Isambard Kingdom Brunel</h1>
</div>
<div id="img-div" class="card "><img id="image" class="card2" style="border-radius:25%; padding:14px;" src="https://images-na.ssl-images-amazon.com/images/I/51wuD01vXIL._SX331_BO1,204,203,200_.jpg" alt="statue of Brunel">
<div id="caption-card" class="card2 script-text clearfix">
<blockquote cite="https://www.azquotes.com/quote/1285979" id="img-caption" style=" "><b>That is very fine; but it is impossible to make the men perfect; the men will always remain the same as they are now; and no legislation will make a man have more presence of mind, or, I believe, make him more cautious; and besides that, the next time such an accident occurs, the circumstances will be so different, that the instructions given to the men, in consequence of the former accident, will not apply.</b></blockquote>
<a href="https://en.wikipedia.org/wiki/Isambard_Kingdom_Brunel" target="_blank" id="tribute-link"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Isambard_Kingdom_Brunel_signature.svg/150px-Isambard_Kingdom_Brunel_signature.svg.png" alt="Brunels_signature" title="Click for more (Wikipedia)"></a>
</div>
</div>
<div class="card">
<h2>About Isambard Kingdom Brunel...</h2>
<article id="tribute-info" class="card2"><b>Isambard Kingdom Brunel</b>(1806-1859) was an English mechanical and civil engineer who is considered "one of the most ingenious and prolific figures in engineering history", "one of the 19th-century engineering giants", and "one of the greatest
figures of the Industrial Revolution, [who] changed the face of the English landscape with his groundbreaking designs and ingenious constructions". Brunel built dockyards, the Great Western Railway, a series of steamships including the first propeller-driven
transatlantic steamship, and numerous important bridges and tunnels. His designs revolutionised public transport and modern engineering. Though Brunel's projects were not always successful, they often contained innovative solutions to long-standing
engineering problems. During his career, Brunel achieved many engineering firsts, including assisting in the building of the first tunnel under a navigable river and development of SS Great Britain, the first propeller-driven, ocean-going, iron
ship, which, when built in 1843, was the largest ship ever built.</article>
<h2>Top 5 Facts About Brunel(mouse-over for more info)...</h2>
<ol class="card2">
<li title="After completing his studies in France, Brunel’s first project was the construction of the underwater Thames Tunnel, which began in 1825 before finally being opened in 1843. Brunel was put in charge of operations, and quickly distinguished himself, although he narrowly avoided drowning after part of the tunnel flooded in 1828.">His career nearly ended before it began</li>
<li title="Brunel’s first major commission was for a bridge spanning the Avon Gorge in Bristol, which he gained after winning a competition judged by architect Thomas Telford. Construction on what would become the Clifton Suspension Bridge began in 1831, though it wouldn’t be complete until 1864 – five years after Brunel’s death.">His first major project was also his last</li>
<li title="After being appointed Chief Engineer of the Great Western Railway in 1833, Brunel spearheaded the design of numerous structures that for the most part have endured and remain prominent to this day, including the Wharncliffe and Chippenham viaducts, the Maidenhead Railway Bridge, the Box Tunnel and Bristol Temple Meads station.">Brunel put the Great in the Great Western Railway</li>
<li title="Brunel was responsible for the design of the SS Great Western, the world’s first steamship purpose-built to complete transatlantic voyages. He also redesigned and constructed a number of the UK’s most important and influential docks, such as Cardiff, Bristol and Milford Haven. We really do owe him a lot, don’t we?">He built the first transatlantic steamship</li>
<li title="A passion for architecture ran in the family – he worked with his father Marc during the construction of the Thames Tunnel, and his son Henry Marc later became a civil engineer, working on the design of the Blackfriars Railway Bridge and the SS Chauncy Maples. Like father like son!">It was a family-wide passion</li>
</ol>
</div>
<footer>
<span>© 2019. Created by Jerami Lessard </span>
</footer>
</div>
</html>
:root {
font-size: calc(12px + (28 - 12) * ((100vw - 300px) / (1600 - 300)));
}
h1 {
font-family: "Trebuchet MS", sans-serif;
text-align: center;
}
h2 {
padding: 0 0 0 2em;
}
.card {
background-color: teal;
padding: 2em;
margin: 2em;
box-shadow: 5px 10px 20px rgba(0, 0, 0, 0.29), 5px 6px 6px rgba(0, 0, 0, 0.43);
}
.card2 {
background-color: #dddfc9;
padding: 3em;
margin: 2em;
box-shadow: 5px 10px 20px rgba(0, 0, 0, 0.29), 5px 6px 6px rgba(0, 0, 0, 0.43);
}
.script-text {
font-family: "Cedarville Cursive", sans-serif;
font-size: 1.5em;
}
#image {
display: block;
margin: auto;
max-width: 100%;
height: auto;
}
#caption-card {
font-size: 120%;
}
#tribute-info {
text-align: justify;
padding: 2em;
}
#tribute-link {
float: right;
}
.clearfix {
overflow: auto;
}
body {
background-color: #dae7d1;
background: url("https://i.pinimg.com/236x/da/22/e0/da22e0453bfc6247d71fd7d1a1bdd42f--steam-engine-hospitals.jpg");
}
footer {
color: burgundy;
float: right;
}
@media only screen and (max-width: 700px) {
#image {
width: 60%;
}
.card {
margin: 0;
}
blockquote {
font-family: "courier";
font-size: 70%;
margin: 0 0 1em 0;
}
}
// !! IMPORTANT README:
// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place.
/***********
INSTRUCTIONS:
- Select the project you would
like to complete from the dropdown
menu.
- Click the "RUN TESTS" button to
run the tests against the blank
pen.
- Click the "TESTS" button to see
the individual test cases.
(should all be failing at first)
- Start coding! As you fulfill each
test case, you will see them go
from red to green.
- As you start to build out your
project, when tests are failing,
you should get helpful errors
along the way!
************/
// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!
// Once you have read the above messages, you can delete all comments.
Also see: Tab Triggers