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.
<div id="main">
<figure id=img-div>
<img id="image" alt="mysterious satoshi nakamoto" src="https://www.coinkolik.com/wp-content/uploads/2020/10/satoshi-donemine-ait-bitcoinler-harekete-gecti-1320x625.jpg">
<h1 id="title"> Satoshi Nakamoto </h1>
<p id="subtitle"><b>Creator of Bitcoin</b></p>
<figcaption id="img-caption">
<i>Satoshi Nakamoto is the pseudonym used by the unknown creator or creators of Bitcoin's blockchain technology.</i>
</figcaption>
</figure>
<main id="tribute-info">
<h2>31 October 2008. The paper that started it all</h2><p> This is the <a href="https://bitcoin.org/bitcoin.pdf" target="_blank">paper</a> that introduced us to Bitcoin and to its inventor Satoshi Nakamoto. It’s a pretty dry, nine-page paper, including the footnotes (and here’s Satoshi announcing it, on a cryptography mailing list). There are equations, flowcharts and tables and it famously concludes:</p>
<p><i>"We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power".</i></p>
<h2>12 January 2009. The first Bitcoin transaction</h2><p> It was worth 50 BTC. From Satoshi himself to developer and cryptography pioneer Hal Finney. Finney, who died from ALS in 2014, used his Bitcoin fortune to have his body cryonically preserved, so you may yet meet him.</p>
<h2>1 May 2010. The first REAL-WORLD Bitcoin transaction</h2><p> Laszlo Hanyecz, living in Florida, bought a pizza using Bitcoin. All right, he transferred 10,000 BTC to a Bitcoin nut in Britain who then bought Laszlo a $25 pizza online from Laszlo’s local Papa John’s. At today’s exchange rate that’s $4,452,300 and, assuming that the Brit hung on to those BTC, he’s now retired or buying minor Damien Hirsts or something.</p>
<h2>10 April 2013. The first major Bitcoin business collapses</h2><p> No shortage of big moments from this chaotic middle period of Bitcoin’s history — the Silk Road bust, the arrival of specialist ‘mining’ hardware, the first shops to accept Bitcoin, the explosion of interest in the mysterious blockchain and so on — but the failure of Mt Gox, the first, biggest and most comically badly-run (imagine a bank run by John Candy’s character from Planes, Trains and Automobiles) of the handful of early ‘Bitcoin exchanges’ is worth mentioning, if only because it triggered the collapse of the biggest Bitcoin bubble yet and reminded us all just how fragile this pretend currency is.</p>
<h2>14 March 2014. Satoshi’s true identity revealed</h2><p> Not really. This turned out to be a journalistic screw-up of career-limiting magnitude. A man with a name that sounded a bit like Satoshi’s was chased around Temple City, California for a few days until it became clear that this story was a crock (the cached version is still online but Newsweek seem to have taken down the original. And I’m not sure I blame them).</p>
<h2>8 December 2015. The ‘unknown Australian genius’ story</h2><p> Wired and Gizmodo both pinned Satoshi’s true identity on a reclusive Australian entrepreneur called Craig Wright. It seemed plausible but the Aussie wouldn’t confirm it. Getting warm.</p>
<h2>2 May 2016. Rory gets the scoop</h2><p> In a room above a coffee bar in Central London, BBC technology correspondent Rory Cellan-Jones brings together Bitcoin royalty John Matonis and Gavin Andresen to meet the shadowy Australian. Craig Wright uses Satoshi’s private key to sign a passage by Sartre. Everyone present believes Craig’s story. Matonis and Andresen both met him weeks earlier and are both sure he’s Satoshi. End of story.</p>
<h2>2 May 2016. Hold on…</h2><p> Oh dear. Bitcoin geeks say that Wright’s signature is invalid. He didn’t sign a passage from Sartre — he just lifted a signature from a known Satoshi transaction on the blockchain. They say he’s fooled two members of the Bitcoin elite and a sceptical BBC tech journalist (reporters from other outlets too). So it looks like Wright’s a con-artist (or at least a fantasist) and we’re back at square one.</p>
<h2>4 May 2016. The experts start to back away</h2><p>Matonis and Andresen are now embarrassed they endorsed Craig Wright. His proof is insubstantial, not what they were expecting. Is Wright for real? Is he Satoshi? Or just a supporting actor. The other two founders are both dead so we can’t ask them (yet). The Bitcoin community is almost unanimous that Wright’s making it up. At the BBC Rory Cellan-Jones continues to try to stand up the story. And what’s most puzzling is that anyone who really controls Satoshi’s Bitcoin ID should find it straightforward to prove it. That, after all, is the point of private key cryptography.</p>
<h3> Learn more about Satoshi's Bitcoin and it's value below: </h3>
</main>
<iframe src="https://www.youtube.com/embed/t1brCcgi174" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" marginwidth="0"
marginheight="0" allowfullscreen></iframe>
<footer>All writings in this "tribute page" exercise are sourced from a Medium article <a id="tribute-link" href="https://bowbrick.medium.com/who-is-satoshi-nakamoto-the-timeline-caccbe3741c6" target="_blank">Who is Satoshi Nakamoto? The timeline: by bowbrick</a> and are only being used personally to learn how to code using HTML and CSS.</footer>
</div>
*{
margin:0;
padding:0;
}
body {
background-color: #0B0C10;
width: 100vw;
}
#main {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 90vw;
margin-left: 5vw;
max-height: 100%;
height: auto;
background-color: #1F2833;
border-radius: 5px;
}
#image-div {
position: relative;
width: 90vw;
height: auto;
}
#image {
position: relative;
width: 88vw;
top: 1vw;
height: auto;
}
#title {
position: absolute;
width: 550px;
background-color: black;
border-radius: 5px;
top: 40px;
left: 30px;
color: #66FCF1;
font-family: exo;
font-weight: 600;
font-size: 4em;
height: auto;
text-shadow:
-1px -1px 0 #C5C6C7,
1px -1px 0 #C5C6C7,
-1px 1px 0 #C5C6C7,
1px 1px 0 #C5C6C7;
}
#subtitle {
position: absolute;
width: 330px;
background-color: black;
border-radius: 5px;
top: 140px;
left: 30px;
color: #66FCF1;
font-family: exo;
font-weight: 40;
font-size: 2.5em;
text-shadow:
-1px -1px 0 #C5C6C7,
1px -1px 0 #C5C6C7,
-1px 1px 0 #C5C6C7,
1px 1px 0 #C5C6C7;
}
#img-caption {
position: relative;
color: #C5C6C7;
text-align: center;
font-family: exo;
top: 12px;
font-size: 16px;
}
#tribute-info {
color: #C5C6C7;
font-family: exo;
font-size: 18px;
max-width: 1280px;
padding: 100px;
}
p {
margin-bottom: 10px;
}
h2 {
color: #45A29E;
font-size: 25px;
margin-bottom: 15px;
}
h3 {
align: center;
text-align: center;
font-family: exo;
color: #66FCF1;
font-size: 35px;
margin-top: 50px;
}
iframe {
align: center;
max-width: 800px;
width: 800px;
height: 450px;
}
footer {
max-width: 1280px;
text-align: center;
margin: 30px auto;
padding: 15px;
font-family: exo;
font-size: .9em;
color: #C5C6C7;
}
a:link {
color: #99ff33;
}
a:visited {
color: #ff00ff;
}
a:hover {
color: #ffff00
}
a:active {
color: #ff9900
}
#tribute-link:link {
color: #99ff33;
}
#tribute-link:visited {
color: #ff00ff;
}
#tribute-link:hover {
color: #ffff00
}
#tribute-link:active {
color: #ff9900
}
@media (max-width: 500px) {
*{
margin:0;
padding:0;
}
body {
background-color: #0B0C10;
width: 100vw;
}
#main {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100vw;
margin-left: 0vw;
max-height: 100%;
height: auto;
background-color: #1F2833;
border-radius: 5px;
}
#image-div {
position: relative;
width: 100vw;
height: auto;
}
#image {
position: relative;
width: 100vw;
top: 0vw;
height: auto;
}
#title {
position: absolute;
width: 220px;
background-color: black;
border-radius: 5px;
top: 20px;
left: 5px;
color: #66FCF1;
font-family: exo;
font-weight: 600;
font-size: 1.6em;
height: auto;
text-shadow:
-.2px -.2px 0 #C5C6C7,
.2px -.2px 0 #C5C6C7,
-.2px .2px 0 #C5C6C7,
.2px .2px 0 #C5C6C7;
}
#subtitle {
position: absolute;
width: 132px;
background-color: black;
border-radius: 5px;
top: 60px;
left: 5px;
color: #66FCF1;
font-family: exo;
font-weight: 40;
font-size: 1em;
text-shadow:
-.2px -.2px 0 #C5C6C7,
.2px -.2px 0 #C5C6C7,
-.2px .2px 0 #C5C6C7,
.2px .2px 0 #C5C6C7;
}
#img-caption {
position: relative;
color: #C5C6C7;
text-align: center;
font-family: exo;
top: 0px;
font-size: 9px;
}
#tribute-info {
color: #C5C6C7;
font-family: exo;
font-size: 16px;
max-width: 500px;
margin-top: 50px;
padding: 20px;
text-align: center;
}
p {
margin-bottom: 20px;
}
h2 {
color: #45A29E;
font-size: 25px;
margin-bottom: 15px;
}
h3 {
align: center;
text-align: center;
font-family: exo;
color: #66FCF1;
font-size: 25px;
margin-top: 50px;
}
iframe {
align: center;
max-width: 500px;
width: 400px;
height: 225px;
}
footer {
max-width: 500px;
text-align: center;
margin: 30px auto;
padding: 15px;
font-family: exo;
font-size: .9em;
color: #C5C6C7;
}
a:link {
color: #99ff33;
}
a:visited {
color: #ff00ff;
}
a:hover {
color: #ffff00
}
a:active {
color: #ff9900
}
#tribute-link:link {
color: #99ff33;
}
#tribute-link:visited {
color: #ff00ff;
}
#tribute-link:hover {
color: #ffff00
}
#tribute-link:active {
color: #ff9900
}
}
// !! 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.
// https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js
Also see: Tab Triggers