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.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title>Medical</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto&display=swap" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous" />
<script src="https://kit.fontawesome.com/a076d05399.js"></script>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<header>
<nav>
<div class="container">
<div class="navbar navbar-expand-lg navbar-light">
<a class="navbar-brand" href="#"><img src="img/logo.png" alt="Medical logo" /></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto my-menu">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">About us</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Services</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Portfolio</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Blog</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Contact</a>
</li>
</ul>
<form class="form-inline my-2 my-lg-0">
<button type="button" class="btn btn-primary my-button">Get started</button>
</form>
</div>
</div>
</div>
</nav>
<div class="container my-jambo">
<div class="jumbotron bg-transparent col-lg-6">
<h1 class="display-4">The best doctors in <strong>Medicine!</strong></h1>
<p class="lead">in the world of modern medicine!</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.</p>
<a class="btn btn-light btn-lg my-button" href="#" role="button">Get started now</a>
</div>
</div>
</header>
<main>
<section id="welcome">
<div class="container">
<div class="row">
<div class="col-md my-vertical-align">
<div class="card border-0">
<div class="card-body">
<h6 class="card-subtitle mb-2 text-muted">Welcome to clinic</h6>
<h3 class="card-title">Why you should choose us ?</h3>
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehen.</p>
<button type="button" class="btn btn-primary my-button">Get started</button>
</div>
</div>
</div>
<div class="col-md">
<img src="img/doc.png" alt="doctor" />
</div>
</div>
</div>
</section>
<section id="features">
<div class="container-fluid">
<article class="row">
<div class="col-md" id="ps"></div>
<div class="col-md my-vertical-align">
<div class="card text-center border-0 bg-transparent">
<div class="card-body">
<h6 class="card-subtitle mb-2 text-muted">Features</h6>
<h3 class="card-title">Professional surgeons</h3>
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehen.</p>
</div>
</div>
</div>
</article>
<article class="row">
<div class="col-md my-vertical-align">
<div class="card text-center border-0 bg-transparent">
<div class="card-body">
<h6 class="card-subtitle mb-2 text-muted">Features</h6>
<h3 class="card-title">Emergency care for children</h3>
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehen.</p>
</div>
</div>
</div>
<div class="col-md" id="cc"></div>
</article>
</div>
</section>
<section>
<div class="container" id="ico">
<div class="container text-center">
<div class="col-md-3 med ">
<i class="fas fa-pills"></i>
<h6>Modern Medicines</h6>
<p class="text-black-50">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor</p>
</div>
<div class="col-md-3 med">
<i class="fas fa-user-edit"></i>
<h6>Perfect Personal</h6>
<p class="text-black-50">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor</p>
</div>
<div class="col-md-3 med">
<i class="fas fa-heartbeat"></i>
<h6>Health Prevention</h6>
<p class="text-black-50">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor</p>
</div>
</div>
<div class="container text-center">
<div class="col-md-3 med">
<i class="fas fa-briefcase-medical"></i>
<h6>First Medical Aid</h6>
<p class="text-black-50">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor</p>
</div>
<div class="col-md-3 med">
<i class="fas fa-microscope"></i>
<h6>Biological Analysis</h6>
<p class="text-black-50">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor</p>
</div>
<div class="col-md-3 med">
<i class="fas fa-phone-alt"></i>
<h6 class="">Private Doctor</h6>
<p class="text-black-50">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor</p>
</div>
</div>
</div>
</section>
<section id="pcs">
<div class="container column">
<div class="container col-sm row justify-content-between">
<div class="pc col-md-3" id="img1"></div>
<div class="pc col-md-3" id="img2"></div>
<div class="pc col-md-3" id="img3"></div>
</div>
<div id="pccs" class="container col-sm row justify-content-between">
<div class="pc col-md-3" id="img4"></div>
<div class="pc col-md-3" id="img5"></div>
<div class="pc col-md-3" id="img6"></div>
</div>
</div>
</section>
<section id="carousel">
<div class="container">
<div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<h5>2323</h5>
<p>3434</p>
</div>
<div class="carousel-item">
<h5>2323</h5>
<p>3434</p>
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</section>
</main>
<footer>
</footer>
<script>
</script>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
</body>
</html>
:root {
--sky: #6bc2f1;
}
header {
min-height: 100vh;
background: url('img/header.jpg') center/cover no-repeat;
}
header nav {
background: rgba(255, 255, 255, .7);
}
.my-menu a {
font: bold .9em "Roboto";
color: #252525;
}
.my-button {
text-transform: uppercase;
font: .8em "Roboto";
padding: 20px 32px;
}
.btn-primary {
background-color: var(--sky);
border-color: var(--sky);
}
.my-jambo {
display: flex;
align-items: flex-end;
height: 90vh;
color: #fff;
}
#welcome {
padding: 120px 0;
}
#welcome h6 {
color: var(--sky) !important;
text-transform: uppercase;
}
#welcome img {
width: 90%;
}
.my-vertical-align {
display: flex;
align-items: center;
}
#features {
background: var(--sky);
min-height: 100vh;
color: #fff;
}
#features h6 {
color: #fff !important;
text-transform: uppercase;
}
#features .col-md {
min-height: 50vh;
}
#ps { background: url('img/ps.jpg') center/cover no-repeat; }
#cc { background: url('img/cc.jpg') center/cover no-repeat; }
#ps:hover, #cc:hover {
filter: opacity(30%);
}
.med {
display: inline-block;
}
i {
font-size: 55px;
color: #2787ba;
}
h6 {
margin: 30px 0 30px 0;
}
#ico {
margin-top: 120px;
margin-bottom: 120px;
}
#pcs {
background: #f1f1f1;
margin-top: 120px;
margin-bottom: 120px;
padding: 60px 0 60px 0;
}
#pccs { margin-top: 30px; }
.pc { min-width: 300px; min-height: 300px;}
#img1 {
background: url('img/pcs/first.jpg');
background-size: cover;
}
#img2 {
background: url('img/pcs/second.jpg');
background-size: cover;
}
#img3 {
background: url('img/pcs/third.jpg');
background-size: cover;
}
#img4 {
background: url('img/pcs/fourth.jpg');
background-size: cover;
}
#img5 {
background: url('img/pcs/fifth.jpg');
background-size: cover;
}
#img6 {
background: url('img/pcs/six.jpg');
background-size: cover;
}
#carousel {
padding: 90px 0 90px 0;
background: #6bc2f1;
}
@media (max-width: 575.98px) {
.my-jambo h1 { font-size: 2em; }
}
@media (max-width: 767.98px) {
#ps { order: 1; }
.pc { min-width: 330px; min-height: 300px;}
}
Also see: Tab Triggers