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.
<main>
<head>
<body>
<title id="title">Tribute to Henry Norman Bethune</title>
<figure id="img-div">
<img id="image" src="https://upload.wikimedia.org/wikipedia/commons/e/e3/Norman_Bethune_graduation_1922.jpg" style=".image";"><figcaption id="img-caption">Henry Norman Bethune</figcaption>
</figure>
<header id="header">
<h1 style="color: blue;">Henry Norman Bethune</h1>
<main id="main">
<div id="tribute-info">
<h2 style="color: red;">Norman's Tribute to Medicine</h2>
<p>One of the most highly regarded surgeons of Canada, Henry Norman Bethune's contribution in the field of Thoracic Surgery and as a social activist including his time at war on the battlefields in both Spain and China, is well-known throughout the world.</p>
<h3>Norman's Timeline from his birth to achievements</h3>
<li>Born March 3, 1890 in Gravenhurst, Canada</li>
<li>Bethune's grandfather was a military surgeon and established Toronto's medical school, Upper
Canada School of Medicine</li>
<li>In 1909, entered the University of Toronto to study physiology and biochemistry</li>
<li>In 1912, entered the medical school at the University of Toronto, but elected to enlist in the Royal Canadian Army Medical Corps two years later due to WWI in 1914</li>
<li>In 1926, diagnosed with tuberculosis, though he recovered after a therapy called artificially induced pneumothorax</li>
<li>In 1928, Norman wanted to increase his knowledge of thoracic surgery so he took training</li>
<li>Wrote 16 papers, became a councilor of the American Assoc. for Thoracic Surgery, and designed most of the thoracic surgical instruments</li>
<li>In 1936, he proposed a universal health care system for Canada</li>
<li>During the Spanish Civil War, he bought equipments to learn blood typing, storage and transfusion and built a mobile transfusion vehicle</li>
<li>The concept of a mobile transfusion vehicle was greatly admired as it could cover miles of the battlefield to tend to the wounded</li>
<li>In 1937 at the age of 48, he aided the chinese and trained the chinese medical specialists during the Sino-Japanese War and was quickly regarded a hero</li>
<li>He opened up a makeshift hospital in a temple on Sept. 15, 1938, but it was destroyed by the japanese</li>
<li>The hospital was relocated and named after Bethune, Bethune International Peace Hospital, in Shijiazhuang</li>
<li>In 1939 of October, he cut his finger performing surgery</li>
<li>He also operated on other patients without gloves since they were not available and also he preferred it that way</li>
<li>An abcess in his finger developed and caused sepsis, Bethune refused to have his arm amputated, and died on Nov. 12, 1939</li>
</div>
</main>
<footer id="footer">
<div>
<a id="tribute-link" href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4676399/" target="_blank">NCBI article on Henry Norman Bethune</a>
body {
background-color:lightyellow;
color: black;
margin: 0px;
width: 100%;
height: 100%;
font-size: 18px;
}
#header {
position: center;
font-size: 20px;
font-color: blue;
}
.h1 {
font-size: 18px;
font-color: blue;
}
.h2{
font-size: 16px;
font-color: red;
}
#image {
max-width: 180px;
max-length: 180px;
margin-left: auto;
margin-right: auto;
display: block;
text-align: center;
font-style: italic;
font-size: small;
border: thin silver solid;
margin: 0.5em;
padding: 0.5em;
}
</style>
Also see: Tab Triggers