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.
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap" rel="stylesheet">
<div class="">
<div class="background-theme">
<div class="page">
<div class="headers">
<p class="purple-font">Ab<span class="gray-font">Tech</span></p>
<nav>
<ul class="list">
<li class="item">
HOME
</li>
<li class="item">
PRODUCT
</li>
<li class="item">
PRINTERS
</li>
<li class="item">
REVIEW
</li>
<li class="item">
EXPERIENCE
</li>
<li class="item">
SUPPORT
</li>
</ul>
</nav>
<div class="login-signup">
LOG IN
<button class="button-style"> SIGN UP</button>
<div class="menu-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-shopping-cart">
<circle cx="9" cy="21" r="1"></circle>
<circle cx="20" cy="21" r="1"></circle>
<path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path>
</svg>
<div class="notifications">
<span>8</span>
</div>
</div>
</div>
</div>
<div class="content">
<div class="left">
<p class="brand-name">LogiTech<span class="reserved">®</span></p>
<p class="sub-text">WIRELESS COMBO MK220</p>
<p class="desc-text">Full features in a compact size</p>
<button class="button-style">VIEW MORE</button>
</div>
<div class="right">
<svg viewbox="0 0 140 145" width="250" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M113.9 37.7c6.3 14.6 7.5 26 13.4 43.2 5.9 17.3 16.5 40.4 10.3 52.4-6.3 12-29.4 12.8-50.5 10.7-21.1-2.1-40.1-7.1-56.4-19.1C14.3 113 .6 94 .6 75 .5 55.9 14.2 36.8 30.5 22.2 46.8 7.6 65.9-2.6 81.1 1.2c15.2 3.9 26.6 21.8 32.8 36.5z" fill="#817DF6"/></svg>
<img class="image-style" src="https://km.support.apple.com/kb/image.jsp?productid=PP179&size=240x240">
<svg class="play-button" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#766AFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-play-circle"><polygon points="10 8 16 12 10 16 10 8"></polygon></svg>
</div>
</div>
</div>
</div>
<div class="white-based-theme">
<div class="page">
<p class="text">
OUR SERVICES
</p>
<p class="service">We Provide Best Quality Service</p>
<p class="marketing-heads">The Managing Director & Cluster Head India & South-West Asia at LogiTech Sumanta<br>
Datta and Goutam Saha, Managing Director of Excel Technologies Ltd
</p>
<div class="features">
<div class="card selected-card">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user-plus" width="60" height="60" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<circle cx="9" cy="7" r="4" />
<path d="M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2" />
<path d="M16 11h6m-3 -3v6" />
</svg>
<p class="benefit selected-benefit">Our Services</p>
<p class="description selected-description">Fast, Powerful & Most Secure Network<br>Solutions for Smart Home & Businesses</p>
<button class="read-more-button">Read More</button>
</div>
<div class="card">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-cloud-download" width="60" height="60" viewBox="0 0 24 24" stroke-width="1.5" stroke="#4646B8" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M19 18a3.5 3.5 0 0 0 0 -7h-1a5 4.5 0 0 0 -11 -2a4.6 4.4 0 0 0 -2.1 8.4" />
<line x1="12" y1="13" x2="12" y2="22" />
<polyline points="9 19 12 22 15 19" />
</svg>
<p class="benefit">Security Solutions</p>
<p class="description">Fast, Powerful & Most Secure Network<br>Solutions for Smart Home & Businesses</p>
<button class="read-more-button">Read More</button>
</div>
<div class="card">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-headphones" width="60" height="60" viewBox="0 0 24 24" stroke-width="1.5" stroke="#4646B8" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<rect x="4" y="13" rx="2" width="5" height="7" />
<rect x="15" y="13" rx="2" width="5" height="7" />
<path d="M4 15v-3a8 8 0 0 1 16 0v3" />
</svg>
<p class="benefit">Sound Systems</p>
<p class="description">Fast, Powerful & Most Secure Network<br>Solutions for Smart Home & Businesses</p>
<button class="selected read-more-button">Read More</button>
</div>
<div class="card">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-keyboard-show" width="60" height="60" viewBox="0 0 24 24" stroke-width="1.5" stroke="#4646B8" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<rect x="2" y="3" width="20" height="12" rx="2" />
<line x1="6" y1="7" x2="6" y2="7" />
<line x1="10" y1="7" x2="10" y2="7" />
<line x1="14" y1="7" x2="14" y2="7" />
<line x1="18" y1="7" x2="18" y2="7" />
<line x1="6" y1="11" x2="6" y2="11.01" />
<line x1="18" y1="11" x2="18" y2="11.01" />
<line x1="10" y1="11" x2="14" y2="11" />
<path d="M10 19l2 2l2 -2" />
</svg>
<p class="benefit">Peripherals</p>
<p class="description">Fast, Powerful & Most Secure Network<br>Solutions for Smart Home & Businesses</p>
<button class="selected read-more-button">Read More</button>
</div>
<div class="card">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="60" height="60" viewBox="0 0 24 24" stroke-width="1.5" stroke="#4646B8" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<rect x="3" y="5" width="18" height="14" rx="4" />
<path d="M10 9l5 3l-5 3z" />
</svg>
<p class="benefit">Video Collaboration</p>
<p class="description">Fast, Powerful & Most Secure Network<br>Solutions for Smart Home & Businesses</p>
<button class="selected read-more-button">Read More</button>
</div>
<div class="card">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-printer" width="60" height="60" viewBox="0 0 24 24" stroke-width="1.5" stroke="#4646B8" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M17 17h2a2 2 0 0 0 2 -2v-4a2 2 0 0 0 -2 -2h-14a2 2 0 0 0 -2 2v4a2 2 0 0 0 2 2h2" />
<path d="M17 9v-4a2 2 0 0 0 -2 -2h-6a2 2 0 0 0 -2 2v4" />
<rect x="7" y="13" width="10" height="8" rx="2" />
</svg>
<p class="benefit">Printers, Projectors & Scanners</p>
<p class="description">Fast, Powerful & Most Secure Network<br>Solutions for Smart Home & Businesses</p>
<button class="selected read-more-button">Read More</button>
</div>
</div>
</div>
</div>
</div>
p {
margin: 0;
}
body{
display:flex;
margin:0;
justify-content:center;
align-items:center;
max-width: 1280px;
}
.page {
padding: 50px;
font-family: "Roboto", sans-serif;
}
.background-theme {
background-color: #f8f8f8;
}
.headers {
display: flex;
align-items: center;
}
.purple-font {
font-size: 20px;
color: #4134b7;
font-weight: 500;
}
.gray-font {
font-size: 20px;
color: #9da1a4;
font-weight: 400;
}
nav {
flex: 1;
}
.list {
font-size: 13px;
font-weight: 700;
list-style: none;
color: #6f7982;
display: flex;
justify-content: center;
gap: 10px;
}
.login-signup {
display: flex;
gap: 20px;
font-size: 11.5px;
font-weight: 700;
color: #677079;
align-items: center;
}
.button-style {
background: linear-gradient(135deg, #4043e6, #746fed);
color: white;
border: none;
padding: 10px 15px;
border-radius: 15px;
}
.menu-icon {
position: relative;
}
.notifications {
display: grid;
place-items: center;
position: absolute;
top: -1px;
right: -8px;
background-color: #272789;
color: white;
font-size: 8px;
width: 12px;
height: 12px;
border-radius: 50%;
}
.content {
flex:1;
padding-top: 70px;
display: grid;
align-items:center;
justify-content:center;
grid-template-columns: 1fr 1fr;
gap: 30px;
}
.brand-name {
color: #484848;
font-size: 18px;
font-weight: 300;
padding-bottom: 12px;
}
.reserved {
color: #484848;
font-size: 14px;
font-weight: 900;
padding-bottom: 12px;
}
.sub-text {
font-weight: 700;
font-size: 20px;
color: #2e2e2e;
padding-bottom: 8px;
}
.desc-text {
color: #545454;
font-weight: 400;
font-size: 10px;
padding-bottom: 12px;
}
.right{
position:relative;
}
.image-style {
position:absolute;
left:0;
bottom:0;
max-width:100%;
}
.play-button{
position:absolute;
left:95px;
top:125px;
background-color:white;
border-radius:50%;
border:2px solid #C3C3C3;
}
.white-based-theme {
background-color: #f8f8fa;
}
.text {
color: #382b94;
font-size: 12px;
font-weight: 700;
text-align: center;
padding-bottom: 10px;
}
.service {
color: #2a2a2a;
font-size: 21px;
font-weight: 400;
text-align: center;
padding-bottom: 10px;
}
.marketing-heads {
color: #717171;
line-height: 18px;
font-size: 11px;
font-weight: 400;
text-align: center;
padding-bottom: 30px;
}
.features {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 20px;
}
.card {
padding: 15px;
background: white;
display:grid;
place-items:center;
box-shadow:10px 10px 5px #F8F7FC;
}
.selected-card {
background: linear-gradient(135deg, #4043e6, #746fed);
}
.benefit{
color:#5D5D5D;
padding-top:20px;
font-size:14px;
font-weight:700;
}
.selected-benefit {
color: white;
}
.description{
color:#939393;
padding:10px 0;
font-size:8px;
font-weight:400;
line-height:15px;
}
.selected-description {
color: white;
}
.read-more-button{
border-radius:20px;
border:1px solid #878995;
background-color:white;
color:#878995;
font-size:10px;
font-weight:700;
padding:8px 15px;
}
Also see: Tab Triggers