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.
<body class="layout">
<header>
<nav class="navbar shadow-1 primary">
<button class="btn rounded-1 white hide-md-up sidenav-trigger small mr-2" data-target="main-sidenav">
Menu
</button>
<a href="#" target="_blank" class="navbar-brand">Axentix</a>
<div class="navbar-menu ml-auto">
<a class="navbar-link active hide-sm-down" href="#">Link 1</a>
<a class="navbar-link hide-sm-down" href="#">Link 2</a>
<a class="navbar-link hide-sm-down" href="#">Link 3</a>
<div id="navbar-dropdown" data-ax="dropdown" class="dropdown" data-dropdown-prevent-viewport="true">
<a class="navbar-link dropdown-trigger" href="#">Dropdown</a>
<div class="dropdown-content white shadow-1 right-aligned">
<a class="dropdown-item" href="#">Item 1</a>
<a class="dropdown-item" href="#">Item 2</a>
</div>
</div>
</div>
</nav>
</header>
<div class="sidenav white shadow-1" id="main-sidenav" data-ax="sidenav">
<div class="sidenav-header">
<img src="https://useaxentix.com/img/axentix.svg" alt="" class="sidenav-logo" />
</div>
<a href="#" class="sidenav-link active">Link 1</a>
<a href="#" class="sidenav-link">Link 2</a>
<a href="#" class="sidenav-link">Link 3</a>
</div>
<main>
<h1 class="txt-center font-w300 mx-2">Hello from Axentix !</h1>
<div class="container mt-5">
<div class="card rounded-2 shadow-1">
<div class="card-header">Material form example</div>
<div class="card-content">
<form class="form-material">
<div class="grix xs1 sm2">
<div class="form-field">
<label for="firstname">Firstname</label>
<input type="text" class="form-control" id="firstname" />
</div>
<div class="form-field">
<label for="firstname">Lastname</label>
<input type="text" class="form-control" id="firstname" placeholder="Toto" />
</div>
</div>
<button type="button" class="btn rounded-1 press secondary mx-auto mt-4">Submit</button>
</form>
</div>
</div>
</div>
<div class="container grix xs3">
<div class="card airforce light-1 shadow-1">
<div class="card-image">
<img src="https://picsum.photos/600/400" alt="logo" />
</div>
<div class="card-header">Card Header</div>
<div class="divider"></div>
<div class="card-content">
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Eligendi suscipit harum repellat architecto unde vel numquam rem
doloribus maiores deserunt tenetur labore, aut, adipisci sit, sequi nihil voluptas commodi? Velit?
</div>
<div class="divider"></div>
<div class="card-footer">Card Footer</div>
</div>
<div class="card airforce light-1 shadow-1">
<div class="card-image">
<img src="https://picsum.photos/600/400" alt="logo" />
</div>
<div class="card-header">Card Header</div>
<div class="divider"></div>
<div class="card-content">
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Eligendi suscipit harum repellat architecto unde vel numquam rem
doloribus maiores deserunt tenetur labore, aut, adipisci sit, sequi nihil voluptas commodi? Velit?
</div>
<div class="divider"></div>
<div class="card-footer">Card Footer</div>
</div>
<div class="card airforce light-1 shadow-1">
<div class="card-image">
<img src="https://picsum.photos/600/400" alt="logo" />
</div>
<div class="card-header">Card Header</div>
<div class="divider"></div>
<div class="card-content">
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Eligendi suscipit harum repellat architecto unde vel numquam rem
doloribus maiores deserunt tenetur labore, aut, adipisci sit, sequi nihil voluptas commodi? Velit?
</div>
<div class="divider"></div>
<div class="card-footer">Card Footer</div>
</div>
</div>
<div class="container card shadow-1 fx-row">
<div class="primary d-flex vcenter fx-center px-4">
<h4>Content</h4>
</div>
<div class="flex fx-col fx-grow">
<div class="card-header">Header</div>
<div class="card-content">
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit.
</p>
</div>
</div>
</div>
<div class="container responsive-table">
<table class="table">
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Age</th>
<th>City</th>
<th>Country</th>
<th>Car</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Paul</td>
<td>24</td>
<td>Paris</td>
<td>France</td>
<td>Mustang</td>
</tr>
<tr>
<td>2</td>
<td>Patrick</td>
<td>34</td>
<td>Nice</td>
<td>France</td>
<td>Renault</td>
</tr>
<tr>
<td>3</td>
<td>Robert</td>
<td>62</td>
<td>Limoges</td>
<td>France</td>
<td>Ferrari</td>
</tr>
</tbody>
</table>
</div>
<div class="container tab shadow-1 mt-4" id="example-tab" data-ax="tab">
<!-- Here is the tab-arrow div -->
<div class="tab-arrow">
<!-- Here is the prev arrow -->
<div class="tab-prev shadow-1 white">
<a href=""><i class="fas fa-chevron-left"></i></a>
</div>
<ul class="tab-menu">
<li class="tab-link">
<a href="#tab1">Tab 1</a>
</li>
<li class="tab-link">
<a href="#tab2">Tab 2</a>
</li>
<li class="tab-link">
<a href="#tab3">Tab 3</a>
</li>
<li class="tab-link">
<a href="#tab4">Tab 4</a>
</li>
<li class="tab-link">
<a href="#tab5">Tab 5</a>
</li>
<li class="tab-link">
<a href="#tab6">Tab 6</a>
</li>
<li class="tab-link">
<a href="#tab7">Tab 7</a>
</li>
</ul>
<!-- Here is the next arrow -->
<div class="tab-next shadow-1 white">
<a href=""><i class="fas fa-chevron-right"></i></a>
</div>
</div>
<div id="tab1" class="p-3">Content 1</div>
<div id="tab2" class="p-3">Content 2</div>
<div id="tab3" class="p-3">Content 3</div>
<div id="tab4" class="p-3">Content 4</div>
<div id="tab5" class="p-3">Content 5</div>
<div id="tab6" class="p-3">Content 6</div>
<div id="tab7" class="p-3">Content 7</div>
</div>
</main>
<footer class="footer primary">
Copyright © 2020 - Example
</footer>
</body>
</html>
Also see: Tab Triggers