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 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.
<head>
<title>Prevention of Coronavirus</title>
</head>
<body>
<h1>How to Protect Yourself</h1>
<!-- Corona animation container -->
<div class="animatediv">
<img src="https://atheistiran.com/wp-content/uploads/2020/03/corona-virus.png">
</div>
<!-- Image on top of the Main menu container -->
<img src="https://atheistiran.com/wp-content/uploads/2020/03/people-mask.png" class="TopImage">
<!-- Main Menu Start -->
<ul class="menu shadow">
<li>
<a href="#CleanYourHand">Clean your hands often</a>
</li>
<li>
<a href="#AvoidCloseContact">Avoid close contact</a>
</li>
<li>
<a href="#StayHome">Stay home if you’re sick</a>
</li>
<li>
<a href="#CoverCoughs">Cover coughs and sneezes</a>
</li>
<li>
<a href="#WearAFacemask">Wear a facemask if you are sick</a>
</li>
<li>
<a href="#CleanAndDisinfect">Clean and Disinfect </a>
</li>
</ul>
<!-- Main Menu End -->
<!-- Free Space container -->
<div style="margin-top:40%"></div>
<!-- Message Boxes -->
<h2>Clean Your Hand</h2>
<div class="messagebox shadow" id="CleanYourHand">
<ul>
<li><strong>Wash your hands</strong> often with soap and water for at least 20 seconds especially after you have been in a public place, or after blowing your nose, coughing, or sneezing.</li>
<br>
<li>If soap and water are not readily available, <strong>use a hand sanitizer that contains at least 60% alcohol</strong>. Cover all surfaces of your hands and rub them together until they feel dry.</li>
<br>
<li><strong>Avoid touching</strong> <strong>your eyes, nose, and mouth</strong> with unwashed hands.
</li>
</ul>
</div>
</div>
<h2>Avoid Close Contact</h2>
<div class="messagebox shadow" id="AvoidCloseContact">
<ul>
<li><strong>Avoid close contact</strong> with people who are sick</li>
<li>Put <strong>distance between yourself and other</strong> <strong>people</strong> if COVID-19 is spreading in your community. This is especially important for people who are at higher risk of getting very sick.</li>
</ul>
</div>
<h2>Stay Home</h2>
<div class="messagebox shadow" id="StayHome">
<li><strong>Stay home</strong> if you are sick, except to get medical care. Learn what to do if you are sick.</li>
</div>
<h2>Cover Coughs</h2>
<div class="messagebox shadow" id="CoverCoughs">
<ul>
<li><strong>Cover your mouth and nose</strong> with a tissue when you cough or sneeze or use the inside of your elbow.</li>
<li><strong>Throw used tissues</strong> in the trash.</li>
<li>Immediately <strong>wash your hands</strong> with soap and water for at least 20 seconds. If soap and water are not readily available, clean your hands with a hand sanitizer that contains at least 60% alcohol.</li>
</ul>
</div>
<h2>Wear A Facemask</h2>
<div class="messagebox shadow" id="WearAFacemask">
<ul>
<li><strong>If you are sick:</strong> You should wear a facemask when you are around other people (e.g., sharing a room or vehicle) and before you enter a healthcare provider’s office. If you are not able to wear a facemask (for example, because it causes trouble breathing), then you should do your best to cover your coughs and sneezes, and people who are caring for you should wear a facemask if they enter your room.</li>
<li><strong>If you are NOT sick: </strong>You do not need to wear a facemask unless you are caring for someone who is sick (and they are not able to wear a facemask). Facemasks may be in short supply and they should be saved for caregivers.</li>
</ul>
</div>
<h2>Clean And Disinfect</h2>
<div class="messagebox shadow" id="CleanAndDisinfect">
<ul>
<li><strong>Clean AND disinfect frequently touched surfaces daily</strong>. This includes tables, doorknobs, light switches, countertops, handles, desks, phones, keyboards, toilets, faucets, and sinks.</li>
<li><strong>If surfaces are dirty, clean them:</strong> Use detergent or soap and water prior to disinfection.</li>
</ul>
</div>
<div id="WashHandsTxt">Wash Your Hands</div>
<!-- Table Container -->
<div id="TblCon">
<h3>More Information?</h3>
<!-- Table Start -->
<table class="Tbl">
<tr>
<th>WHO</th>
<th>CORONAVIRUS OUTBREAK</th>
<th>Novel Coronavirus Situation</th>
</tr>
<tr>
<td>
<a href="https://www.who.int">
<img src="https://devpolicy.org/wp-content/uploads/2015/02/image13.png" alt="world health organization" style="width:100px">
</a>
</td>
<td>
<a href="https://www.worldometers.info/coronavirus/">
<img src="https://www.worldometers.info/img/worldometers-logo.gif">
</a>
</td>
<td>
<a href="https://experience.arcgis.com/experience/685d0ace521648f8a5beeeee1b9125cd">
<img src="https://experience.arcgis.com/site/widgets/landing/dist/runtime/assets/exb-logo.png" style="width:100px"
</a>
</td>
</tr>
</table>
<!-- Table End -->
</div>
</body>
body{
overflow: auto;
background: linear-gradient(to bottom, #e2e2e2, #ffffff);
font-family:Tahoma;
font-size:15px;
}
/* Headers Style */
h1{
text-align:center;
font-size:5em;
color:#fff;
text-shadow: 0px 1px 2px #000;
}
h2{
text-align:left;
font-size:3em;
color:#007E30;
margin-left:120px;
margin-bottom:-5px;
}
h3{
text-align:left;
font-size:2em;
color:#fff;
background:#007E30;
padding-left:120px;
}
/* Image top of the menu */
.TopImage{
position:relative;
left:110px;
z-index:2;
width:300px;
margin-bottom:-2px;
}
/* Text boxes style */
.messagebox{
width:80%;
height:200px;
background-color:white;
position:relative;
left:120px;
line-height: 1.5em;
padding:25px;
margin-bottom: 50px;
border-left:5px solid #007E30;
}
/* Text boxes style in hover */
.messagebox:hover {
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}
/* Default shadow style */
.shadow{
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
}
/* CoronaVirus Animation
Default speed is: 10s
MoveUpDown is a keyFrames that define the position*/
.animatediv{
animation: MoveUpDown 10s linear infinite;
position: absolute;
right: 300px;
}
/* position of corona animation */
@keyframes MoveUpDown {
0%, 100% {
top: 150px;
}
50% {
top: 250px;
}
}
/*Main Menu Style*/
ul.menu {
position:absolute;
left:120px;
background:#fff;
width:300px;
z-index:3;
margin:0px;
padding:0px;
list-style: none;
overflow:hidden;
}
.menu li a {
width:300px;
padding-left:15px;
height:40px;
line-height:40px;
display:block;
overflow:hidden;
position:relative;
text-decoration:none;
font-size:15px;
color:#686868;
}
.menu li a:hover {
background:#efefef;
border-left:5px solid #007E30;
}
/*Table Container Style*/
#TblCon{
background:#efefef;
}
/*Table Style*/
.Tbl{
width:70%;
margin-left: auto;
margin-right: auto;
text-align:center;
font-size:10px;
}
/* Final Tite (Wash Your Hands) */
#WashHandsTxt{
color:lightgrey;
font-size:8em;
text-align:center;
}
/*.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.*/
Also see: Tab Triggers