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.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
</head>
<body>
<div id="wrapper">
<!-- H1, HERO-IMG, SUB-HEAD AND BODYTEXT IN DEUTSCH -->
<h1>ulm 1</h1>
<img src="//c1.staticflickr.com/1/329/32483102405_38aec28cdd_h.jpg" alt="Landscape view of the Hochschule für Gestaltung, Ulm"/>
<div class="subhead subhead-de">
<p>Vierteljahresbericht<br/>der Hochschule für Gestaltung, Ulm<br/>Oktober 1958</p>
<p>Preis pro Nummer DM 1.― / SFr 1.― / OS 7.50<br/>Jahresabonnement DM 4.― / SFr 4.― / OS 30<br/>portofrei</p>
</div>
<div class="bodytext bodytext-de">
<p>Die Hochschule für Gestaltung bildet Frachkräfte aus für zwei entscheidende Aufgaben der technischen Zivilisation: die Gestaltung industrieller Produkte (Abteilung Produktform und Abteilung Bauen); die Gestaltung bildhafter und sprachlicher Mitteilungen (Abteilung visuelle Kommunikation und Abteilung Information).</p>
<p>Die Hochschule für Gestaltung bildet damit Gestalter heran für die Gebrauchs- und Produktionsgüterindustrie sowie für die modernen Kommunikationsmittel Presse, Film, Funk und Werbung. Diese Gestalter müssen über die technologischen und wissenschaftlichen Fachkenntniesse verfügen, die für eine Mitwirkung in der heutigen Industrie erforderlich sind. Gleischzeitig müssen sie die kulturellen und gesellschaftlichen Konsequenzen ihrer Arbeit erfassen und berücksichtigen.</p>
<p>Die Hochschule für Gestaltung ist als eine Schule für höchstens 150 Studierende konzipiert, um ein günstiges Zahlenverhältnis zwischen Studierenden und Dozenten zu gewährleisten.</p>
<p>Dozenten und Studierende kommen aus verschiedenen Ländern und geben der Hochschule einen internationalen Charakter.</p>
</div>
<!-- SUB-HEAD AND BODYTEXT IN ENGLISH -->
<div class="subhead subhead-en">
<p>Quarterly bulletin<br/>of the Hochschule für Gestaltung, Ulm<br/>October 1958</p>
<p>Price per issue 2s 6d / $0.50<br/>Yearly subscription 10s / $2.00 post paid</p>
</div>
<div class="bodytext bodytext-en">
<p>The Hochschule für Gestaltung educates specialists for two different tasks of our technical civilization: The design of industrial products (industrial design department and building department); The design of visual and verbal means of communication (visual communication department and information department).</p>
<p>The school thus educates designers for the production and consumer goods industries as well as for present-day means of communication: press, films, broadcasting, television, and advertising. These designers must have at their disposal the technological and scientific knowledge necessary for collaboration in industry today. At the same time they must grasp and bear in mind the cultural and sociological consequences of their work.</p>
<p>The Hochschule für Gestaltung is conceived as a school for maximum number of 150 students, in order to ensure a favourable proportion between the number of students and faculty. Faculty and students come from many different countries, thus giving the school an international character.</p>
</div>
<!-- SUB-HEAD AND BODYTEXT IN FRENCH -->
<div class="subhead subhead-fr">
<p>Bulletin trimestriel<br/>de la Hochschule für Gestaltung, Ulm<br/>Octobre 1958</p>
<p>Prix du numéro 125 frs / L 175<br/>Abonnement annuel 500 frs / L700 port payé</p>
</div>
<div class="bodytext bodytext-fr">
<p>La Hochschule für Gestaltung s'attache à former des specialists appelés à remplir deux tâches d'importance decisive dans notre civilisation technique: la creation dans le domaine des produits industriels (section Industrial Design et section Industrialistion du Bâtiment); la creation dans le domaine de la communication visuelle et verbale (section Communication Visuelle et section Information).</p>
<p>La Hochschule für Gestaltungforme dês créateurs qui s'appliquent tant à l'étude d'objets industriels de consommation ET de production, qu'à celle des moyens moderns de communication (presse, film, radiodiffusion, television, publicité). Ces créateurs devront posséder les connaissances techniques et théoriques aujourd'hui nécessaries à une collaboration fructueuse avec l'industrie. Ils devront aussi considerer et mesurer la portée des consequences sociales et culturelles de leur travail.</p>
<p>La Hochschule für Gestaltung est conçue de manière à recevoir un maximum de 150 étudiants, afin d'assurer une proportion numérique favorable aux rapports entre étudiants et professeurs, qui viennent de tous les horizons et donnent "a l'Escole son caractère international.</p>
</div>
</div>
</body>
/* GLOBAL STYLES */
html{
font-size:100%;
font-family:Helvetica, Sans-Serif;
}
body{
margin:0 auto 24px;
padding:0 5%;
max-width:624px;
}
h1{
font-size:6em;
line-height:1;
letter-spacing:-0.025em;
word-spacing:-8px;
text-indent:-8px;
margin-top:2rem;
margin-bottom:1rem;
}
p{
line-height:1.5em;
}
/* IMAGE STYLES */
img{
width:100%;
max-height:100%;
}
/* SUB-HEAD STYLES */
.subhead-de, .subhead-en, .subhead-fr{
margin-top:2rem;
}
.subhead p{
font-weight:700;
}
/* DESKTOP STYLES - MEDIA QUERIES (1270px) */
@supports (display:grid){
@media (min-width:1024px){
/* GLOBAL STYLES */
body{
font-size:80%;
max-width:98%;
padding:0;
}
#wrapper{
display:grid;
grid-template-columns:repeat(4, 1fr);
grid-template-rows:auto;
grid-column-gap:24px;
}
h1{
margin-bottom:0;
grid-column:2 /5;
grid-row:1 / 2;
}
p{
font-weight:700;
}
/* IMAGE STYLES */
img{
grid-column:1 / 5;
grid-row:3 / 4;
}
/* SUB-HEAD STYLES */
.subhead-de, .subhead-en, .subhead-fr{
margin-top:0;
margin-bottom:6rem;
}
.subhead-de{
grid-column:2 / 3;
grid-row:2 / 3;
}
.subhead-en{
grid-column:3 / 4;
grid-row:2 / 3;
}
.subhead-fr{
grid-column:4 / 5;
grid-row:2 / 3;
}
/* BODYTEXT STYLES */
.bodytext-de, .bodytext-en, .bodytext-fr{
margin-top:1rem;
}
.bodytext-de{
grid-column:2 / 3;
grid-row:4 / 5;
}
.bodytext-en{
grid-column:3 / 4;
grid-row:4 / 5;
}
.bodytext-fr{
grid-column:4 / 5;
grid-row:4 / 5;
}
}
/* DESKTOP STYLES - MEDIA QUERIES (1280px) */
@media (min-width:1280px){
/* GLOBAL STYLES */
body{
font-size:100%;
}
}
Also see: Tab Triggers