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.
<!--
Hello Camper!
For now, the test suite only works in Chrome! Please read the README below in the JS Editor before beginning. Feel free to delete this message once you have read it. Good luck and Happy Coding!
- The freeCodeCamp Team
Notes:
Copyright & Permissions Guidelines
No permission is needed for one-time use of Divine Mercy image or short excerpts from St. Faustina's Diary (under 1000 words) on non-profit Parish-based websites.
https://www.thedivinemercy.org/house/copyright
-->
<html>
<head>
<title>Tribute</title>
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Girassol&family=IM+Fell+Great+Primer+SC&display=swap" rel="stylesheet">
</head>
<!-- Story #1 -->
<body id="main">
<!-- User Story #2: -->
<header id="title">
<h1>Saint Faustina</h1>
</header>
<figure>
<!-- User Story #3 -->
<div id="img-div">
<!-- User Story #4 -->
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a8/200px-Faustina.jpg/220px-200px-Faustina.jpg" id="image" alt="Portrait of Saint Faustina" />
<!-- User Story #5 -->
<figcaption id="img-caption">
<h4>“It is a great thing to know how to make use of the present moment.”
― Maria Faustina Kowalska, Diary of Saint Maria Faustina Kowalska: Divine Mercy in My Soul</h4>
</figcaption>
</div>
</figure>
<!-- User Story #6 -->
<section id="tribute-info">
<p class="text-regular">In 1965, with the approval of the Holy Office, Karol Wojtyła, then Archbishop of Kraków and later Pope John Paul II, opened the initial informative process into Kowalska's life and virtues, interviewed witnesses and in 1967 submitted a number of documents about Kowalska to the Vatican, requesting the start of the official process of her beatification. This was begun in 1968, and concluded with her beatification on April 18<sup>th</sup> 1993. Saint Faustina was beatified on April 18<sup>th</sup> 1993 and canonized on April 30<sup>th</sup> 2000. Her feast day is October 5<sup>th</sup>.</p>
</section>
<!-- width="727" height="409" -->
<iframe width="300" height="200" src="https://www.youtube.com/embed/PMCQlSIoNk4" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<span class="text-regular">Love and Mercy: FAUSTINA - trailer</span>
<!-- User Story #7 -->
<!-- User Story #8 -->
<p class="text-regular">Learn more:<a id="tribute-link" href="https://en.wikipedia.org/wiki/Faustina_Kowalska" target="_blank"> Wikipedia page</a><p>
</body>
</html>
header {
/* border: 3px solid red; */
max-width: 300px;
text-shadow: 2px 2px 5px black;
font-size: 26px;
text-shadow: 2px 2px 5px red;
margin-bottom: 150px;
}
body {
background-color: rgb(18,27,34);
/* background-image: linear-gradient(hsl(25, 100%, 25%), hsl(25, 100%, 50%)); */
background-image: url(https://lh3.googleusercontent.com/rJAYRr-AnByi_EtAg6U-wQ_L7Acd0nUQnfow2opvjOhvMyPvJQZ3VSBqTnsMH77OKs8XjMhgINZxeSjDVX1TvBLtrIjsAwFO6OUSAv4Eym08pANHjeH2n1doqHtpoh7-d0DbXA-FblTxu-Bqx3Bf5UZuQf3Lk9RJtqZayPNY9HRDJMgqwHtOJByVUdzf4we-Rz_T5Yn3k9WlUCN0HOtDM92783RGUlB3fWunNYyAKcCoxpImJ2brWXXxlT_0jqgZvqCy5j6rSFR9jC-ZUuf3VIMZnZV7xjX_F19nGiFR-dZ9K4IjsXG-YQzC_VP5RAkkm8JdQ1_5z15tdE1F-ErebEHSByFMLtB9voqta4iouE_zk5TwacBTxLKdH395ly-j4eZ-0oUBi5XXvpVZmLXDwUgj8Im4Q_rZpRH35vrsdBSY0ZzAL6SZ4jKn-Qlhe239N2IaDIji2I32dgYjptHrDRQKeYPciskY9DsQ5dVQTDLPdl9Zv5Wx5ZNXtxVUwm9qTd4F6nwjvuj75nXoFjAnhoWEwzGGb13zr0zXxkfphhtTZRp8PB63A-rPyEGW93xo0jj84Ygc7lPbcaEJFbCh7qPI3X9XG4Za0fcnLm6YpLcbjgsHQRa7Gmn8tVhHNSqbSJJJNIyA_F4x_y_6CWB55kVlGjgRXk321kukT6HgUKEXocTWnsjpLFOJKjnclg=w1124-h843-no),
linear-gradient(rgba(25, 25, 25, .7), rgba(100, 100, 100, .3));
background-repeat: no-repeat;
background-size: 1500px 1200px;
/* background-attached: fixed; */
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-family: 'Dancing Script', cursive, "Times New Roman", Times, serif;
color: whitesmoke;
text-shadow: 2px 2px 5px red;
}
#img-div {
/* border: 3px solid green; */
display: flex;
flex-wrap: wrap;
flex-direction: column;
justify-content: center;
align-items: center;
height: auto;
width: 500px;
margin: 0 auto;
max-width: 100%;
padding: 25px;
}
img {
/* border: 3px solid blue; */
display: block;
height: auto;
margin: 0 auto;
max-width: 100%;
box-shadow: 3px 3px 7px whitesmoke;
border-radius: 5%;
}
#img-caption {
font-size: 20px;
}
#tribute-info {
/* border: 3px solid orange; */
display: flex;
width: 500px;
padding: 25px;
font-size: 24px;
}
.text-regular {
font-family: 'IM Fell Great Primer SC';
}
sup {
font-size: 16px
}
// !! 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.
/*
User Story #1: My tribute page should have an element with a corresponding id="main", which contains all other elements.
User Story #2: I should see an element with a corresponding id="title", which contains a string (i.e. text) that describes the subject of the tribute page (e.g. "Dr. Norman Borlaug").
User Story #3: I should see a div element with a corresponding id="img-div".
User Story #4: Within the img-div element, I should see an img element with a corresponding id="image".
User Story #5: Within the img-div element, I should see an element with a corresponding id="img-caption" that contains textual content describing the image shown in img-div.
User Story #6: I should see an element with a corresponding id="tribute-info", which contains textual content describing the subject of the tribute page.
User Story #7: I should see an a element with a corresponding id="tribute-link", which links to an outside site that contains additional information about the subject of the tribute page. HINT: You must give your element an attribute of target and set it to _blank in order for your link to open in a new tab (i.e. target="_blank").
User Story #8: The img element should responsively resize, relative to the width of its parent element, without exceeding its original size.
User Story #9: The img element should be centered within its parent element.
You can build your project by forking this CodePen pen. Or you can use this CDN link to run the tests in any environment you like: https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js.
Once you're done, submit the URL to your working project with all its tests passing.
*/
Also see: Tab Triggers