Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

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.

+ add another resource

Packages

Add Packages

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.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <h1>Sorry, but size matters</h1>
<p>More about this without the very cheap headline, in the article <a href="https://pimpmytype.com/font-size/" target="_blank">What’s the right font size in web design?</a> This is the body text. Ideally the typeface for this long reading text is understated. Its speciality should be that it does not seem special – except to some type nerds, of course. Here content is king, not the typeface. In other words a text typeface should not draw much attention to itself.</p>
<figure>
  <a href="https://youtu.be/JagGAq7fwyc" traget="_blank"><img src="https://pimpmytype.com/wp-content/uploads/2021/09/18-font-size-in-responsive-web-design.jpg"></a>
  <figcaption>Teaching you how to size it up, baby!</figcaption>
</figure>
<p>It’s humble and its job is to get out of the reader’s way and let the words speak. Very bluntly said “boring is better”. For display text in the headings it can be different. You see these words before you read them so the typeface could be interesting and attention grabbing. So have fun choosing a nice font for it!</p>
<h2>My font size brings all the clients to the site</h2>
<p>And they’re like, it’s better than yours! Damn right, it’s better than yours. I can teach you, but I have to charge. This is the body text. Ideally the typeface for this long reading text is understated. Its speciality should be that it does not seem special – except to some type nerds, of course. Here content is king, not the typeface. In other words a text typeface should not draw much attention to itself. It’s humble and its job is to get out of the reader’s way and let the words speak. Very bluntly said “boring is better”. For display text in the headings it can be different. You see these words before you read them so the typeface could be interesting and attention grabbing. So have fun choosing a nice font for it!</p>
              
            
!

CSS

              
                /* BASE STYLES */

@import url('https://fonts.googleapis.com/css2?family=Inria+Sans:wght@300;400;700&family=Inria+Serif&display=swap');

body {
  font-family: "Inria Serif", "Piazzolla";
  padding: 0 1rem;
  margin: 0 auto;
  color: #333;
  line-height: 1.6;
}

h1 {
  font-family: "Inria Sans";
  font-weight: 300;
  margin-bottom: 0;
  line-height: 1.1;
}

h2 {
  font-family: "Inria Sans";
  line-height: 1.2;
  margin-top: 2.4rem;
}

/* DEMO STYLES */

body {
    max-width: 32rem;
}

figure {
  margin: 0
}

img {
  max-width: 100%;
}

figcaption {
  font-family: "Inria Sans";
  color: #555;
}


/* Deomo code */


p {
  font-size: 1rem;  
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 1.5rem;
}

figcaption {
  font-size: 0.8rem;
}



@media screen and (min-width: 768px) {
  html {
    font-size: 110%;
  }
}

@media screen and (min-width: 1024px) {
  html {
    font-size: 120%;
  }
}

@media screen and (min-width: 1200px) {
  html {
    font-size: 130%;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console