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 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.
header(style="font-family: Verdana, Geneva, sans-serif;")
h1 Brutalism Web Design School
p Create web designs that get back to the basics by using Brutalist principles. Find out what natural resources are available to you and how you can implement them on your site.
nav(style="font-family: Verdana, Geneva, sans-serif;")
hr
| [
a(href="#responsive-design") Responsive Design
| ]
| [
a(href="#fonts") Fonts
| ]
| [
a(href="#colors") Colors
| ]
| [
a(href="#images") Images
| ]
| [
a(href="#javascript") JavaScript
| ]
| [
a(href="#inspiration") Inspiration
| ]
hr
article(style="font-family: 'Trebuchet MS', Helvetica, sans-serif;")
section#responsive-design
h3(style="font-family: Tahoma, Geneva, sans-serif;") WHAT ABOUT RESPONSIVE DESIGN?
p The awesome news is that <mark>HTML5 is responsive without having to do anything to it</mark>. That's right: no media queries necessary. It's when we start messing with HTML that it becomes unresponsive. Ridiculous, no?
p You can apply margins and max-widths through inline CSS if you want, but it's not necessary for the site to look good on a mobile device.
section#fonts
h3(style="font-family: Tahoma, Geneva, sans-serif;") WHAT FONTS CAN I USE?
p Here is a list of websafe fonts that are able to be used by any browser <mark>without an external call or extra overhead</mark>:
h4 Serif Fonts
ul
li Georgia, serif
li 'Palatino Linotype', 'Book Antiqua', Palatino, serif
li 'Times New Roman', Times, serif
h4 Sans-Serif Fonts
ul
li Arial, Helvetica, sans-serif
li 'Arial Black', Gadget, sans-serif
li 'Comic Sans MS', cursive, sans-serif
li Impact, Charcoal, sans-serif
li 'Lucida Sans Unicode', 'Lucida Grande', sans-serif
li Tahoma, Geneva, sans-serif
li 'Trebuchet MS', Helvetica, sans-serif
li Verdana, Geneva, sans-serif
h4 Monospace Fonts
ul
li 'Courier New', Courier, monospace
li 'Lucida Console', Monaco, monospace
hr
p Example usage:
p <pre>< p style="font-family: [copy and past here from the lists above];" >Some Text here< /p></pre>
p Input:
p <pre>< p style="font-family: Arial, Helvetica, sans-serif;" >Some Text here< /p></pre>
p Output:
p(style="font-family: Arial, Helvetica, sans-serif;") Some Text here
hr
section#colors
h3(style="font-family: Tahoma, Geneva, sans-serif;") ARE THERE COLOR LIMITATIONS?
p There are a huge number of colors available for you to use. Add color to your HTML sites in one of three ways. The first is by using a <mark>color name</mark>, which is easier to remember than a bunch of numbers. <a href="https://www.w3schools.com/colors/colors_names.asp" target="_blank">Here are the 140 supported names you can use.</a>
p A second way to use color is through <mark>RGB values</mark>. That stands for Red, Green, Blue. By mixing these values together, you can achieve amazing color combinations.
p The last way is also the most classic way to enter color information into your website: use the <mark>hexadecimal code</mark> for the color you want. This is a 6-digit code prefixed with a "#". For example, the color "white" has a hex code of #ffffff.
p
a(href="https://www.w3schools.com/colors/colors_picker.asp" target="_blank") Check out this great color picker to choose hex codes or RGB colors
section#images
h3(style="font-family: Tahoma, Geneva, sans-serif;") CAN I USE IMAGES?
p Images are great, aren't they? Of course you can use images. <mark>Brutalism doesn't mean the absence of design</mark> or heading back into the Stone Age. It's merely a stripping away of the unnecessaries. So before you put that image on there, decide about its necessity, that's all. If it supports or helps the user, add it with an image tag. There are several options for images (even image maps!)--<a href="https://www.w3schools.com/html/html_images.asp" target="_blank">learn more about HTML images here</a>.
section#javascript
h3(style="font-family: Tahoma, Geneva, sans-serif;") SHOULD WE USE JAVASCRIPT?
p JavaScript (JS) is an optional element on the Web. In some ways it's just a bridge to do today what we want to do in the browser tomorrow. Lots of people will disagree with that, especially those who are making their livings creating JS apps and programs. I would agree that it's here to stay. Technically, though, you can also create Flash programs now, too, but no one is doing that outside of specialized applications. Will JS go that direction? Not sure. But <mark>if you create websites or apps viewed in-browser, know that if someone somehow turns off JS in the browser settings your page might render poorly (best-case) or not work at all (worst-case)</mark>.
P The best course of action for JS is to make sure that if it were turned off in the browser then nothing would be hidden forever or broken. If you focus your efforts on semantic HTML and CSS, then users will have no problems. In fact, websites like <a href="https://css-tricks.com/" target="_blank">CSS-Tricks</a> are writing articles about getting JS-type functionality into the CSS layer. Lots of people don't want to mix behaviors and presentation in CSS, so they buck against it. But right now, HTML and CSS are the only things we can guarantee will work in the browser.
p If you're still unsatisfied and wondering what the answer is: Yes, you can use JS. Just use it responsibly, ok?
hr
section#inspiration
h3(style="font-family: Tahoma, Geneva, sans-serif;") BRUTALISM WEBSITES
p You're a rebel. I can tell. Here are some websites that will help you get some inspiration for your Brutalist designs.
p Enjoy
figure
a(href="http://brutalistwebsites.com/", target="_blank")
img(src="http://www.tarahall.me/img/brutalist-websites.png", style="height: 200px;")
figcaption BrutalistWebsites.com
figure
a(href="http://nickdemarco.website/", target="_blank")
img(src="http://brutalistwebsites.com/_img/nickdemarco.website.png", style="height: 200px;")
figcaption Nick De Marco
figure
a(href="http://benjaminbaedorf.com/", target="_blank")
img(src="http://brutalistwebsites.com/_img/benjaminbaedorf.com.png", style="height: 200px;")
figcaption Benjamin Bädorf
figure
a(href="http://tobimania.de/", target="_blank")
img(src="http://brutalistwebsites.com/_img/tobimania.de.png", style="height: 200px;")
figcaption Tobi Mania
body
padding: 20px
max-width: 700px
margin: auto
border-left: 10px solid #444
color: #444
h1
margin: 0 0 20px
h2,
h3
margin: 60px 0 15px
nav
margin: 40px 0
Also see: Tab Triggers