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.
<!-- JS for test -->
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<link href="https://fonts.googleapis.com/css?family=Kosugi+Maru&subset=japanese" rel="stylesheet">
<div id="main">
<h1 id="title">
Osamu Tezuka
</h1>
<div>
<p>
The man who is a manga author and creator of many of the first Japanese animation.
</p>
<p>
He is often credited as the "Father of Anime", and is often considered the Japanese equivalent to Walt Disney, who served as a major inspiration during his formative years.
</p>
</div>
<div id="img-div">
<!-- Image shoud be responsive. Use max-width: property. And display: block;-->
<img src="https://upload.wikimedia.org/wikipedia/commons/1/1d/Osamu_Tezuka_1951_Scan10008-2.JPG"
id="image" alt="Picture of Osamu Tezuka from Wikipedia">
<div id="img-caption">
<span class="kanji">手塚治虫</span> - Osamu Tezuka in 1951
</div>
</div>
<div id="tribute-info">
<!-- Tribute info text is here! -->
<h2 id="headline">Here's a time line of Osamu's life:</h2>
<ul>
<li><strong>1928</strong> - Born as the eldest son of Tezuka Yutaka and Fumiko in Osaka, Japan on November 3.</li>
<li><strong>1945</strong> - Accepted into Osaka University and began studying medicine. </li>
<li><strong>1946</strong> - "Diary of Ma-chan"(マアチャンの日記帳), the comic strip that marked his debut as a Manga artist, is first serialized in the Mainichi School Children's Newspaper.</li>
<li><strong>1947</strong> - Publishes a long comic entitled "New Treasure Island" (新宝島), based on the story by Sakai Shichima; the manga went through several editions with 400,000 copies sold.</li>
<li><strong>1950</strong> - Publishes his first major success "Jungle Emperor Leo" (ジャングル大帝), it was serialized from 1950 to 1954.</li>
<li><strong>1951</strong> - Piblished "Ambassador Atom" (アトム大使), the first appearance of the Astro Boy character. In 1952, this charactor became extremely popular and known as humanoid robot named Atom. Then, "Tetsuwan Atom"(鉄腕アトム) began serialization in Weekly Shonen Magazine. </li>
<li><strong>1953</strong> - Published the first shōjo manga "Princess Knight"(リボンの騎士), serialized in Shojo Club from 1953 to 1956.
Moves to an apartment called Tokiwa-so (トキワ荘). (Tokiwa-so was an apartment in Toshima-ku, Tokyo. And it's famous as the birthplace of Japanese manga culture.) </li>
<li><strong>1954</strong> - Published well known as his lifework "Phoenix" (火の鳥). </li>
<li><strong>1961</strong> - Established Mushi Production which had animation division.</li>
<li><strong>1967</strong> - Created magazine named "COM". And he started to change his style more realistic. His books became focused on an adult audience. "Dororo" (どろろ) was first serialized in Weekly Shōnen Sunday. This was one of the comic featuring demons.</li>
<li><strong>1972</strong> - Published "Buddha" (ブッダ) , dealing with the life of Gautama Buddha, the founder of Buddhism.</li>
<li><strong>1973</strong> - Published "Black Jack" (ブラックジャック) , dealing with the medical adventures of the title character, doctor Black Jack.</li>
<li><strong>1981</strong> - Published "Hidamari no Ki" (陽だまりの樹) . This is the story of friendship between a samurai and a doctor in the final days of the Tokugawa Shogunate. The doctor was one of Osamu'z ancestors.</li>
<li><strong>1989</strong> - Died of stomach cancer on 9 February. "I'm begging you, let me work!", he said as his last word.</li>
</ul>
<blockquote>
<p>"Comics are an international language, they can cross boundaries and generations. Comics are a bridge between all cultures."</p>
</blockquote>
<h2 id="related_links">References</h2>
<div id="thanks">This tribute page is written with reference to these sites. Thank you so much for introducing his great works and information.</div>
<ul>
<li>
<a href="https://tezukaosamu.net/jp/" target="_blank">Osamu Tezuka Official Site</a>
</li>
<li>
<a href="http://tezukainenglish.com/wp/" target="_blank">Tezuka In English</a>
</li>
<li>
<a href="https://en.wikipedia.org/wiki/Osamu_Tezuka" target="_blank">Osamu Tezuka Wikipedia</a>
</li>
</ul>
<h3>If you have time, you should read more about this incredible human being on his <a id="tribute-link" href="https://en.wikipedia.org/wiki/Osamu_Tezuka" target="_blank">Wikipedia entry</a>.</h3>
</div>
</div>
<div id="footer">
This page is provided as one of the Responsive Web Design Project's work of <a href="https://learn.freecodecamp.org/" target="_blank">freeCodeCamp</a>.
</div>
/**
* TODO:
* Use webfont for title.
* Use background image like grid-note.
**/
html, body{
font-family: Helvetica, sans-serif;
text-align:center;
min-width:260px;
color:#333;
}
#title {
}
.kanji {
font-family: 'Kosugi Maru', sans-serif;
}
#main{
margin:30px 5 auto;
padding: 15px;
border:0px solid;
border-radius:5px;
background:#eee;
}
#img-div {
margin:-5px;
margin-top:20px;
width: 100%;
border:5px solid white;
background:white;
}
#image {
// "mergin: auto" and "display: block" enable to center image.
// Without "display: block" image is not centered.
margin: auto;
display: block;
// Responsive image size.
max-width: 100%;
height: auto;
width: auto;
}
#img-caption{
margin:15px;
}
#headline, #related_links{
margin-top:50px;
text-align:center;
}
#tribute-info {
text-align: left;
}
blockquote{
color: rgb(122, 123, 124);
font-style: italic;
background: white;
padding: 5px 10px 5px 10px;
border-width: 0 0 0 3px;
border-style: solid;
border-color: silver;
}
#footer {
padding: 15px;
width: auto;
background: #d7dae0;
}
document.getElementsByTagName("h1")[0].style.fontSize = "60px";
Also see: Tab Triggers