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.
<!-- Read the full post on abbr at https://jen4web.substack.com/p/abbr -->
<h1>Challenge for Details and Definitions:<br>
< dfn>, < dl>, < dt>, < dd>, < details>, < summary> and < abbr></h1>
<p>INSTRUCTIONS: Fork this CodePen and mark up the passage below the best way you know how with any HTML elements you know. Share your marked up CodePen on Substack with any comments about why you made the choices you did, or comment in your code with your ideas.</p>
<p>NOTE: Because this is how content often is provided, the choices you make in your markup are yours -- as you've seen, there often truly is not just one correct solution. Decide what you think is important, position: sticky those decisions in your mind, and above all be consistent.</p>
<p><a href="https://jen4web.substack.com/p/abbr-discussion" target="_blank" class="button">Share your answer on Substack</a></p>
<hr> <!-- hr: a thematic break in a section. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr -->
Hogwarts School of Witchcraft and Wizardry:
Founded in the 10th century by Godric Gryffindor, Rowena Ravenclaw, Helga Hufflepuff and Salazar Slytherin, Hogwarts was established in the Highlands of Scotland to educate young wizards and witches as well as to keep students safe from muggle (non-magic humans) prosecution.
Students enter the school as 11-year-olds and are divided into one of four houses by a magical hat. It takes seven years to complete their education. In the fifth year, students take Ordinary Wizarding Level (O.W.L.) examinations. The OWLs are standardized tests that determine if a student can go on taking specific courses their few next years. Nastily Exhausting Wizarding Test or N.E.W.T.s, taken in the final year, are major determining factors in a witch or wizard obtaining their preferred line of work outside of Hogwarts.
Pass Grades
Outstanding (O)
Exceeds Expectations (E)
Acceptable (A)
Fail Grades
Poor (P)
Dreadful (D)
Troll (T)
The Four Houses of Hogwarts:
Hufflepuff
Hufflepuff values hard work, patience, justice, and loyalty. The house mascot is the badger, and canary yellow and black (or golden yellow and graphite in the Fantastic Beasts films) are its colours. The house ghost is the Fat Friar.
Gryffindor
Gryffindor values courage, bravery, nerve, and chivalry. Gryffindor's mascot is the lion, and its colours are scarlet red and gold (maroon and gold on the ties and scarves). During the books, the Head of this house is the Transfiguration Professor and Deputy Headmistress, Minerva McGonagall until she becomes headmistress. The house ghost is Sir Nicholas de Mimsy-Porpington, more commonly known as Nearly Headless Nick.
“You might belong in Gryffindor,
Where dwell the brave at heart,
Their daring, nerve and chivalry
Set Gryffindors apart.”
—The Sorting Hat
Slytherin
Slytherin values ambition, cunning, leadership, and resourcefulness; the Sorting Hat said in Harry Potter and the Philosopher's Stone that Slytherins will do anything to get their way. The house mascot of Slytherin is the serpent, and the house colours are green and silver. The ghost of Slytherin house is The Bloody Baron.
Ravenclaw
Ravenclaw values intelligence, learning, wisdom and wit. The house mascot is an eagle and the house colours are blue and bronze (blue and silver in the Harry Potter and Fantastic Beasts films and on the ties and scarves). The house ghost is the Grey Lady.
Descriptions are provided by Wikipedia
More descriptions and details about the houses of Hogwarts can be found at https://en.wikipedia.org/wiki/Hogwarts. The Harry Potter series is a popular fictional work written by British author JK Rowling. The book series was made into a series of films, a sequel two-performance play, and now a series of prequels, the Fantastic Beasts films. JK Rowling has come under scrutiny in recent years for her comments about transgender individuals.
body {
font-family: Arial, sans-serif;
}
.button {
background-color: #eb3b5a;
padding: 0.5rem 1rem;
border: 1px solid #eb3b5a;
border-radius: 30px;
color: white;
text-decoration: none;
font-weight: bold;
display: inline-block;
margin-bottom: 5rem;
}
.button:hover {
color: #eb3b5a;
background-color: white;
}
/*
💯 This challenge is certified 100% free of JavaScript.
ALL THE GOOD STUFF IS IN THE HTML BLOCK :-D
*/
Also see: Tab Triggers