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.
<div class="line"></div>
<div class="wrapper">
<header role="banner">
<nav role="navigation">
<h1><a href="#">Asperion</a></h1>
<ul class="nav-ul">
<li><a href="#">Home</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Technologies</a></li>
<li><a href="#">Projects</a></li>
<li><a href="#">Contacts</a></li>
</ul>
</nav>
</header>
<main role="main">
<section class="sec-intro" role="section">
<img src="https://www.techweekeurope.co.uk/wp-content/uploads/2012/07/wifimountaindownload.jpg" alt="" />
<h1>Be Innovative!</h1>
</section>
<section class="sec-boxes" role="section">
<adrticle class="box">
<h1>Open-minded</h1>
<p>Every option should be explored and tried no matter how unpredictable, impossible, insane or ridiculous does it looks or sound.</p>
<button class="button" type="button" role="button" value="MORE">More</button>
</adrticle>
<adrticle class="box">
<h1>Creative</h1>
<p>Brainstorming, idea generation, playing sessions, note taking. You think you used everything? We will challenge your mind and its abilities to the limits.</p>
<button class="button" type="button" role="button" value="MORE">More</button>
</adrticle>
<adrticle class="box">
<h1>Bold</h1>
<p>Our methods and ideas are are not written or following any books, curriculums or rules. We consider ourselves rebels and we are proud of it.</p>
<button class="button" type="button" role="button" value="MORE">More</button>
</adrticle>
<adrticle class="box">
<h1>Smart</h1>
<p>Every project with innovation as a goal requires smart approach. Identify real problem first and look for the smartest and simplest solution later.</p>
<button class="button" type="button" role="button" value="MORE">More</button>
</adrticle>
</section>
<section class="sec-events" role="section">
<hr />
<h1>Upcomming events</h1>
<article>
<h1>Tire Technology Expo</h1>
<p>Tire Technology Expo has grown in strength and stature every year since it was started in Europe 15 years ago. Visitors and exhibitors to the conference and exhibition staged in February 2014 universally praised it as the 'world's leading tire design and tire manufacturing event', noting in particular the outstanding quality of the conference papers and speakers, and the comprehensive extent of machinery manufacturers and suppliers who exhibited at the event.</p>
<a class="link" href="#">more...</a>
</article>
<article>
<h1>Meteorology World Expo</h1>
<p>Meteorological Technology World Expo is a truly international exhibition of the very latest climate, weather and hydro - meteorological forecasting, measurement and analysis technologies and service providers for a global community of key decision makers within the aviation industry, shipping companies, marine / port installations, airports, military operations, off-shore exploration companies, wind farm operators, met offices, agriculture operations and research institutes.</p>
<a class="link" href="#">more...</a>
</article>
<article>
<h1>Wearable Tech Expo</h1>
<p>See live demos, listen to case studies, speak with Wearable Tech Experts The first Wearable Tech Expo in Tokyo 2014. Key players from Japan, America and Europe announced their new products and attracted attention from all over the world. The next Wearable Tech Expo in Tokyo will be doubling in size and include Robotics and IoT. The main players in the wearable industry, human factor engineers, brain scientists, media providers and creators will discuss the future of wearable technology! </p>
<a class="link" href="#">more...</a>
</article>
<article>
<h1>Space Tech Expo</h1>
<p>Space Tech Expo is the West Coast's premier B2B space event for spacecraft, satellite, launch vehicle and space-related technologies. Taking place in Long Beach, the Space Tech Expo exhibition and conference brings together global decision-makers involved in the design, build and testing of spacecraft, satellite, launch vehicle and space-related technologies. Leading the West Coast space and satellite industry, Space Tech Expo is where end-users connect with solution providers.</p>
<a class="link" href="#">more...</a>
</article>
</section>
<section class="sec-projects" role="section">
<hr />
<h1>Previous Projects</h1>
<article>
<h1>Neural network for Google</h1>
<p>People from Google approached us this January with offer to create new neural network for whole Google's ecosystem. This idea was very interesting and looked almost impossible at first glance. However, our engineers proved their expertise and built amazing autonomous platform. <a class="link" href="#">more...</a></p>
</article>
<article>
<h1>Faster operating system for Apple</h1>
<p>For a years, since founding days of a company, Apple always worked with its own operating system. In October, this was about to change. Our company got chance to rewrite the history by creating brand new OS for Apple. It was very difficult and all our employees worked hard every day. <a class="link" href="#">more...</a></p>
</article>
<article>
<h1>Manufacturing technology for Intel</h1>
<p>Intel has been manufacturing company for many years. They always used the latest technologies to achieve the best results with lowest costs. However, this was not enough. Intel decided to offer us something that could disrupt whole technology sector. <a class="link" href="#">more...</a></p>
</article>
</section>
<section class="sec-standards" role="section">
<hr />
<h1>Our Standards</h1>
<article>
<h1>Excellence</h1>
<p>Our goal is to give our customers the best solutions in highest aquality. Our employees strive for excellence and work hard to achieve it. Everything must work and be reliable. Great design must be both, aesthetic and functional. Product or service that pass these conditions will be everlasting.</p>
</article>
<article>
<h1>Uniqueness</h1>
<p>Our mantra is to create new paths. We are not interested in copying others because we know, that if you want to succeed, you have to be different, unique. Our customers know that we create unique products and experience for them. This is the best way to differentiate us and our brand from the noise on market. Unique, different and proud.</p>
</article>
</section>
<section class="sec-partners" role="section">
<hr />
<h1>Our Partners</h1>
<div class="row">
<div class="logo-container">
<img src="https://i.imgur.com/oSriTuP.png" alt="Google logo" />
</div>
<div class="logo-container">
<img src="https://i.imgur.com/kRgvevC.png" alt="Apple logo" />
</div>
<div class="logo-container">
<img src="https://i.imgur.com/ZZjeIP3.png" alt="Wii logo" />
</div>
<div class="logo-container">
<img src="https://i.imgur.com/536rtCW.png" alt="Valve logo" />
</div>
<div class="logo-container">
<img src="https://i.imgur.com/VTq1c9p.png" alt="Adithya Institute of Technology logo" />
</div>
<div class="logo-container">
<img src="https://i.imgur.com/GdYoyxo.png" alt="Intel logo" />
</div>
</div>
</section>
</main>
</div>
<footer>
<nav role="navigation">
<ul class="nav-ul">
<li><a href="#">Home</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Technologies</a></li>
<li><a href="#">Projects</a></li>
<li><a href="#">Contacts</a></li>
</ul>
</nav>
<p class="copy">© Alex Devero Design 2014</p>
</footer>
<div class="line"></div>
// Variables
$red: #ad0000;
$lightBlack: #333;
$darkGrey: #a9a9a9;
$ghostWhite: #f8f8ff;
$lightGrey: #d3d3d3;
// Mixins
@mixin transition($property) {transition: $property .25s;}
/*Typography*/
html {font: 16px 'Open Sans Condensed', 'Roboto Condensed', Verdana, sans-serif;}
h1 {font-size: 2.25em;}
h2 {font-size: 2em;}
h3 {font-size: 1.75em;}
h4 {font-size: 1.5em;}
p {font-size: 1.25em;}
/*Layout*/
html,
body {
width: 100%;
height: 100%;
}
body {color: #333;}
*,
*:before,
*:after {box-sizing: border-box;}
.line {
float: left;
width: 100%;
border-top: .25em solid $lightBlack;
}
.wrapper {
margin: auto;
width: 60em;/*960px*/
//min-height: 100%;
}
header,
nav,
section,
footer {
float: left;
width: 100%;
}
a {
text-decoration: none;
transition: color .25s;
}
.button {
display: block;
padding: .75em 1.25em;
font-size: 1em;
font-weight: bold;
text-transform: uppercase;
background: $red;
color: #fff;
border: 0;
cursor: pointer;
&:focus,
&:hover {background: darken($red, 7%);}
&:active {background: #c10000;}
}
.link {
font-weight: bold;
color: $red;
&:focus,
&:hover {color: darken($red, 10%);}
&:active {color: lighten($red, 5%);}
}
/*Navigation*/
nav h1 {
float: left;
padding: .25em .25em 0 0;
font-size: 4.5em;
text-transform: uppercase;
}
nav h1 a {color: $red;}
.nav-ul {
display: flex;
}
header li {width: 20%;}
header li:not(:first-child) {margin-left: 2%;}
header .nav-ul a {
display: block;
padding: 1.75em .5em;
font-size: 1.5em;
text-align: center;
text-transform: uppercase;
color: $lightBlack;
&:focus,
&:hover {color: $red;}
&:active {color: lighten($red, 5%);}
}
header li:first-child a {
background: $red;
color: #fff;
&:hover {color: #fff;}
}
/*Sections*/
section {margin: 1em 0;}
section h1 {text-transform: uppercase;}
hr {
border-color: $lightGrey;
border-style: dashed;
}
.vertical {
width: 0;
height: 10px;
}
/*Intro*/
.sec-intro {position: relative;}
.sec-intro img {
width: 100%;
}
.sec-intro h1 {
position: absolute;
bottom: .5em;
left: .5em;
padding: .5em;
background: rgba(0,0,0,.5);
color: #fff;
}
/*Boxes*/
.box {
float: left;
padding: 1.5em 1em;
width: 25%;
height: 400px;
border-top: .1em solid $lightGrey;
border-bottom: .1em solid $lightGrey;
border-left: .1em solid $lightGrey;
@include transition(background);
&:focus,
&:hover {background: #f5f5f5;}
}
.box:last-child {border-right: .1em solid $lightGrey;}
.box h1 {text-align: center;}
.box p {
margin-top: 4em;
height: 6em;
text-align: justify;
}
.box .button {
margin: 4em auto;
}
/*Events*/
.sec-events > h1 {margin-top: 1em;}
.sec-events article {
float: left;
padding: 0 .25em;
width: 25%;
text-align: justify;
}
.sec-events article h1,
.sec-events article p {
display: block;
margin: .5em 0;
padding: .25em 1em;
font-size: 110%;
}
.sec-events article a {float: right;padding-right: 1em;}
.sec-events article h1 {font-weight: bold;text-align: center;}
/*Projects*/
.sec-projects {width: 60%;}
.sec-projects > h1 {
margin-top: 1em;
text-align: center;
}
.sec-projects article {
padding: .5em 0;
width: 100%;
}
.sec-projects article h1,
.sec-projects article p {font-size: 110%;}
.sec-projects article h1 {font-weight: bold;}
.sec-projects article p {
margin: .5em .5em .5em 0;
text-align: justify;
}
.sec-projects p a {float: right;}
.sec-projects button {
position: relative;
left: 80%;
}
/*Standards*/
.sec-standards {width: 40%;}
.sec-standards > h1 {
margin-top: 1em;
text-align: center;
}
.sec-standards article {
float: left;
padding: .5em 1em;
width: 50%;
text-align: justify;
}
.sec-standards article:last-child {padding: .5em 0;}
.sec-standards article h1 {text-align: center;}
/*Partners*/
.sec-partners h1 {margin-top: 1em;}
.sec-partners .row {
float: left;
margin: 2em 0;
width: 100%;
}
.logo-container {
float: left;
width: 16%;
width: 100px;
}
.logo-container:not(:first-child) {margin-left: 7.5%;}
.logo-container:first-child {margin-top: .2em;}
.logo-container:nth-of-type(2) img {margin-top: 1.2em}
.logo-container:nth-of-type(3) img {margin-top: 1.8em;}
.logo-container:nth-of-type(4) img {margin-top: 2.35em;}
.logo-container:nth-of-type(5) img {margin-top: .35em;}
.logo-container:last-of-type img {margin-top: .65em;}
.sec-partners img {
float: left;
width: 100%;
}
/*Footer*/
footer {
padding: 2em 0;
width: 100%;
text-align: center;
background: $lightGrey;
}
footer .nav-ul {justify-content: center;margin-bottom: 1em;}
footer li:not(:first-child) {margin-left: .75em;}
footer li:first-child a {color: $lightBlack;}
footer a {
font-size: 1.25em;
font-weight: bold;
color: $darkGrey;
&:focus,
&:hover {color: $lightBlack;}
}
.copy {font-size: .85em;}
/*
Created by Alex Devero
More information on
http://alexdevero.com
To learn about HTML5, CSS3 and Javascript visit http://alexsblog.org
*/
Also see: Tab Triggers