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.
<main>
<center class="hero">
<h1>Marx</h1>
<h3 id="tagline">The classless CSS reset (perfect for Communists).</h3>
<p>No JavaScript. No Classes. Just raw CSS. <br><small>11.1 kB / 3.7 kB (Gzip) minified.</small></p>
<div> <a href="https://unpkg.com/marx-css/css/marx.min.css" target="_blank" id="download"><button>Download</button></a> <a href="https://github.com/mblode/marx" target="_blank" id="github"><button>Github</button></a> </div>
</center>
<h3 id="is-marx-for-you">Is Marx for you?</h3>
<p>Marx is a CSS stylesheet to be used in any projects (namely small ones). If you don't need the weight of heavy frameworks or you would just like to make an edible website quickly, Marx is perfect for you. It can be used out of the minified box but it
can also be customised and styled through the use of HTML classes.</p>
<h3 id="key-features">Key Features</h3>
<ul>
<li>Built atop of Sanitize.css, meaning all browsers render consistently.</li>
<li>Responsive and mobile-friendly.</li>
<li>Clean, beautiful typography.</li>
<li>Forms, tables, buttons and navigation.</li>
<li>Zero classes, so it already works with your HTML.</li>
<li>Drop-dead gorgeous.</li>
<li>It just works.</li>
</ul>
<p><a href="https://github.com/mblode/marx">For more info, check out Marx on Github.</a></p>
<h1>Documentation</h1>
<pre>
<code>
<main>
<footer></footer>
</main>
</code>
</pre>
<section>
<h2>Typography</h2>
<h3>Headings</h3>
<h1>h1 <small>small h1</small> </h1>
<h2>h2 <small>small h2</small> </h2>
<h3>h3 <small>small h3</small> </h3>
<h4>h4 <small>small h4</small> </h4>
<h5>h5 <small>small h5</small> </h5>
<h6>h6 <small>small h6</small> </h6> <pre>
<code>
<h1>h1
<small>small h1</small>
</h1>
<h2>h2
<small>small h2</small>
</h2>
<h3>h3
<small>small h3</small>
</h3>
<h4>h4
<small>small h4</small>
</h4>
<h5>h5
<small>small h5</small>
</h5>
<h6>h6
<small>small h6</small>
</h6>
</code>
</pre>
<h3>Body copy</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Excepturi ipsa tempore alias illum, in dicta sed laboriosam inventore sequi, accusantium magnam dolores modi commodi, magni labore illo a quisquam incidunt.</p>
<p> <strong>strong tag</strong>, <b>b tag</b>, <em>em tag</em>, <i>italic tag</i>, <u>underline tag</u></p>
<figcaption>Hello, world!</figcaption>
<blockquote>"Capitalism? More like CRAPitalism, am I right?" <br> - Karl Marx, probably.</blockquote> <pre>
<code>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
<p>
<strong>strong</strong>
<b>b</b>
<em>em</em>
<italic>italic</italic>
<underline>underline</underline>
</p>
<figcaption>Hello, world!</figcaption>
<blockquote>Hello, world!</blockquote>
</code>
</pre>
<h3>Code</h3> <pre>
<code>
pre {
background: #efefef;
color: #444;
display: block;
font-family: Menlo, monospace;
font-size: 1.4rem;
margin-bottom: .8remrem;
padding: 1.6rem;
word-break: break-all;
word-wrap: break-word;
}
code {
background: #efefef;
color: #444;
font-family: Menlo, monospace;
font-size: 1.4rem;
word-break: break-all;
word-wrap: break-word;
}
</code>
</pre> <pre>
<code>
<pre>
<code>So meta</code>
</pre>
</code>
</pre>
<h3>Lists</h3>
<ul>
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
<li>Aliquam tincidunt mauris eu risus.</li>
<li>Vestibulum auctor dapibus neque.</li>
</ul>
<ol>
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
<li>Aliquam tincidunt mauris eu risus.</li>
<li>Vestibulum auctor dapibus neque.</li>
</ol>
<dl> <dt>Lorum Ipsum</dt>
<dd>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.</dd> <dt>Lorum Ipsum</dt>
<dd>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.</dd>
</dl> <pre>
<code>
<ul>
<li>Unordered list</li>
<li><a href="#">Unordered links</a></li>
</ul>
<ol>
<li>Ordered list</li>
<li><a href="#">Ordered links</a></li>
</ol>
<dl>
<dt>Description list title</dt>
<dd>Description</dd>
</dl>
</code>
</pre>
<h2>Buttons</h2> <input type=submit value="Input Submit"> <button>Button</button> <a href="#"><button>Button Link</button></a> <button disabled>Disabled Button</button> <pre>
<code>
<input type="submit" value="Submit">
<button>Button</button>
<a href="#"><button>Button Link</button></a>
</code>
</pre>
<h2>Forms</h2>
<form>
<h3>Text Inputs</h3> <label for=name>Text Input:</label> <input name=name type="text" id=name tabindex=1 placeholder="Text Input"><br> <label for=textarea>Textarea:</label> <textarea rows=4 cols=27 id=textarea placeholder="Text Area"></textarea> <pre>
<code>
<label for="text">Text:</label>
<input type="text" name="text" id="text" tab-index="1" placeholder="text"></input>
<label for="textarea">Text Area:</label>
<textarea rows="4" cols="27" id="textarea" placeholder="textarea"></textarea>
</code>
</pre>
<h3>Radio Buttons</h3> <label for=radio-choice-1>Radio 1:</label> <input type=radio name=radio-1 id=radio-1 tabindex=1 value=radio-1 /><br> <label for=radio-2>Radio 2:</label> <input type=radio name=radio-2 id=radio-2 tabindex=2 value=radio-2 /> <pre>
<code>
<label for="radio">Radio:</label>
<input type="radio" name="radio" id="radio" tab-index="1" value="true"></input>
</code>
</pre>
<h3>Checkbox Buttons</h3> <label for="checkbox1">Checkbox 1:</label> <input type="checkbox" name="checkbox1" id="checkbox1" /><br> <label for="checkbox2">Checkbox 2:</label> <input type="checkbox" name="checkbox2" id="checkbox2" /> <pre>
<code>
<label for="checkbox">Checkbox</label>
<input type="checkbox" name="checkbox" id="checkbox"></input>
</code>
</pre>
<h3>Dropdown Choices</h3> <label for=select-choice>Select Dropdown Choice:</label> <select name=select-choice id=select-choice> <option value="Choice 1">Choice 1</option> <option value="Choice 2">Choice 2</option> <option value="Choice 3">Choice 3</option> </select><br> <pre>
<code>
<label for="drop">Dropdown</label>
<select name="drop" id="drop">
<option value="drop1">One</option>
<option value="drop2">Two</option>
<option value="drop3">Three</label>
</select>
</code>
</pre> <input type=submit value=Submit> </form>
<h2>Tables</h2>
<table>
<thead>
<tr>
<th>One</th>
<th>Two</th>
<th>Three</th>
<th>Four</th>
</tr>
</thead>
<tbody>
<tr>
<td>One</td>
<td>Two</td>
<td>Three</td>
<td>Four</td>
</tr>
<tr>
<td>One</td>
<td>Two</td>
<td>Three</td>
<td>Four</td>
</tr>
<tr>
<td>One</td>
<td>Two</td>
<td>Three</td>
<td>Four</td>
</tr>
</tbody>
</table> <pre>
<code>
<table>
<thead>
<tr>
<th>One</th>
<th>Two</th>
</tr>
</thead>
<tbody>
<tr>
<td>One</td>
<td>Two</td>
</tr>
</tbody>
</table>
</code>
</pre> </section>
<footer>
<p>© 2021 · <a href="https://github.com/mblode/" target="_blank">Matthew Blode</a></p>
</footer>
</main>
Also see: Tab Triggers