cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

            
              
<html>
  <head>
    <meta charset="UTF-8">
    <title>Readability & Typography</title>
    

      <link href='https://fonts.googleapis.com/css?family=Crimson+Text:400,400italic,700' rel='stylesheet' type='text/css'>
      <link href='https://fonts.googleapis.com/css?family=Julius+Sans+One' rel='stylesheet' type='text/css'>
      <link href='https://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">

	<!-- Optional theme -->
		


    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>

	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
  </head>
  <body>
    <!-- Here, I'm using Google Fonts... -->
    
    <h4>We're going to focus on a few simple ways to make a page more readable</h4>
    <p style="font-family: Times; font-size: 12px;">Aren't you sick of reading stuff that look like this?</p>

    <div class="col-md-12 text-center">
	    <h2>Using five lines of <code>CSS</code>...</h4>
  <p><code>font-family</code></p>
  <p><code>font-size</code></p>
  <p><code>line-height</code></p>
  <p><code>margin-left</code></p>
  <p><code>margin-right</code></p>
  <h2>And the font pairings showcased here...<p><code><a href="https://femmebot.github.io/google-type/">Google Web Fonts Typographic Project</a></code></p></h2>
  <h4>We're going to explore basic principles of readability and typography...so that our websites stop looking like <span style="font-family: Times; font-size: 12px; color: black;">this.</span>
<hr>

    </div>

    <h1>This is a heading</h1>
    <!-- This is dummy text, used by typographers for centuries. -->
    <p>Here I can write a paragraph introduction. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In rutrum accumsan ultricies. Mauris vitae nisi at sem facilisis semper ac in est.</p>
    <h2>This is a subheading</h2>
    <!-- Practice making comments with ⌘/ -->
    <!-- More dummy text! -->
    <p>Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper ultricies. Curabitur ornare, ligula semper consectetur sagittis, nisi diam iaculis velit, id fringilla sem nunc vel mi. Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna et turpis. Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci. Fusce eget orci a orci congue vestibulum. Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenatis pulvinar tellus gravida ornare. Sed et erat faucibus nunc euismod ultricies ut id justo. Nullam cursus suscipit nisi, et ultrices justo sodales nec. Fusce venenatis facilisis lectus ac semper. Aliquam at massa ipsum. Quisque bibendum purus convallis nulla ultrices ultricies. Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra pretium nisi quam vitae mi. Fusce vel volutpat elit. Nam sagittis nisi dui.</p>
    
    <h2>What's happening here?</h2>
    <p>There are three kinds of typefaces on this page:</p>
<div class="alert alert-info">

    <p>1. Serif: look at a (printed) book. You'll find a serif typeface.</p>
    <p style="font-family: Oswald">2. Sans serif: these look modern, technical, and lighter. Smartphones, the NYC Subway signs- all Sans serif.</p>
    <p style="font-family: Menlo">3. Monospace: Ever seen a typewriter?</p>
</div>
    
    <p>Deliberately using contrasting font types for different elements (body text vs. headings, for example) helps users more easily navigate content.</p>
    <div class="alert alert-warning">
    	<strong>Coding connection:</strong> Why do you think we always see code written in <span style="font-family: Menlo">monospace</span> fonts?
    </div> 
    
    <p>I'm also deliberately using just 3 colors- one for body, one for <span style="color: #3c8FFF">headings</span>, and one for <code>code</code>.

<div class="col-md-6 text-center">
<a class="btn btn-default" data-toggle="collapse" href="#HTML" aria-expanded="false" aria-controls="collapseExample">
  Get the <code>HTML</code> for this page.
</a>
<div class="collapse" id="HTML"><br>

	<div style="text-align:left;color:#f6f7ee; background-color:#111c2a; border:solid black 1px; border-radius: 5px ;padding:0.5em 1em 0.5em 1em; overflow:auto;font-size:14px; font-family:monospace; "><span style="color:#ffffff;">&lt;!DOCTYPE html&gt;</span><br />
<span style="color:#f82939;">&lt;html &gt;</span><br />
&nbsp;&nbsp;<span style="color:#f82939;">&lt;head&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#f82939;">&lt;meta </span><span style="color:#3beb2a;">charset</span><span style="color:#f82939;">=</span><span style="color:#fcc146;">&quot;UTF-8&quot;</span><span style="color:#f82939;">&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#f82939;">&lt;title&gt;</span>Readability &amp; Typography<span style="color:#f82939;">&lt;/title&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#f82939;">&lt;link </span><span style="color:#3beb2a;">rel</span><span style="color:#f82939;">=</span><span style="color:#fcc146;">&quot;stylesheet&quot;</span><span style="color:#f82939;"> </span><span style="color:#3beb2a;">href</span><span style="color:#f82939;">=</span><span style="color:#fcc146;">&quot;</span><span style="color:#63cce3;">css/style.css</span><span style="color:#fcc146;">&quot;</span><span style="color:#f82939;">&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;<span style="color:#f82939;">&lt;/head&gt;</span><br />
&nbsp;&nbsp;<span style="color:#f82939;">&lt;body&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;<em><span style="color:#838c95;">&lt;!-- Here, I'm using Google Fonts... --&gt;</span></em><br />
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#f82939;">&lt;head&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#f82939;">&lt;link </span><span style="color:#3beb2a;">href</span><span style="color:#f82939;">=</span><span style="color:#fcc146;">'https://fonts.googleapis.com/css?family=Crimson+Text:400,400italic,700'</span><span style="color:#f82939;"> </span><span style="color:#3beb2a;">rel</span><span style="color:#f82939;">=</span><span style="color:#fcc146;">'stylesheet'</span><span style="color:#f82939;"> </span><span style="color:#3beb2a;">type</span><span style="color:#f82939;">=</span><span style="color:#fcc146;">'text/css'</span><span style="color:#f82939;">&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#f82939;">&lt;link </span><span style="color:#3beb2a;">href</span><span style="color:#f82939;">=</span><span style="color:#fcc146;">'https://fonts.googleapis.com/css?family=Julius+Sans+One'</span><span style="color:#f82939;"> </span><span style="color:#3beb2a;">rel</span><span style="color:#f82939;">=</span><span style="color:#fcc146;">'stylesheet'</span><span style="color:#f82939;"> </span><span style="color:#3beb2a;">type</span><span style="color:#f82939;">=</span><span style="color:#fcc146;">'text/css'</span><span style="color:#f82939;">&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#f82939;">&lt;link </span><span style="color:#3beb2a;">href</span><span style="color:#f82939;">=</span><span style="color:#fcc146;">'https://fonts.googleapis.com/css?family=Oswald'</span><span style="color:#f82939;"> </span><span style="color:#3beb2a;">rel</span><span style="color:#f82939;">=</span><span style="color:#fcc146;">'stylesheet'</span><span style="color:#f82939;"> </span><span style="color:#3beb2a;">type</span><span style="color:#f82939;">=</span><span style="color:#fcc146;">'text/css'</span><span style="color:#f82939;">&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#f82939;">&lt;/head&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#f82939;">&lt;h1&gt;</span>This is a heading<span style="color:#f82939;">&lt;/h1&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;<em><span style="color:#838c95;">&lt;!-- This is dummy text, used by typographers for centuries. --&gt;</span></em><br />
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#f82939;">&lt;p&gt;</span>Here I can write a paragraph introduction. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In rutrum accumsan ultricies. Mauris vitae nisi at sem facilisis semper ac in est.<span style="color:#f82939;">&lt;/p&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#f82939;">&lt;h2&gt;</span>This is a subheading<span style="color:#f82939;">&lt;/h2&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;<em><span style="color:#838c95;">&lt;!-- Practice making comments with </span></em><span style="color:#838c95;">&#8984;<em>/ --&gt;</em></span><br />
&nbsp;&nbsp;&nbsp;&nbsp;<em><span style="color:#838c95;">&lt;!-- More dummy text! --&gt;</span></em><br />
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#f82939;">&lt;p&gt;</span>Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper ultricies. Curabitur ornare, ligula semper consectetur sagittis, nisi diam iaculis velit, id fringilla sem nunc vel mi. Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna et turpis. Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci. Fusce eget orci a orci congue vestibulum. Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenatis pulvinar tellus gravida ornare. Sed et erat faucibus nunc euismod ultricies ut id justo. Nullam cursus suscipit nisi, et ultrices justo sodales nec. Fusce venenatis facilisis lectus ac semper. Aliquam at massa ipsum. Quisque bibendum purus convallis nulla ultrices ultricies. Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra pretium nisi quam vitae mi. Fusce vel volutpat elit. Nam sagittis nisi dui.<span style="color:#f82939;">&lt;/p&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;<span style="color:#f82939;">&lt;/body&gt;</span><br />
<span style="color:#f82939;">&lt;/html&gt;</span></div>


</div></div>



<div class="col-md-6 text-center">
<a class="btn btn-default" data-toggle="collapse" href="#CSS" aria-expanded="false" aria-controls="collapseExample">
  Get the <code>CSS</code> for this page.
</a>
<div class="collapse" id="CSS"><br>


<div style="text-align:left;color:#f6f7ee; background-color:#111c2a; border:solid black 1px; border-radius: 5px; padding:0.5em 1em 0.5em 1em; overflow:auto;font-size:14px; font-family:monospace; ">h1, h2 {<br />
&nbsp;&nbsp;<span style="color:#3beb2a;">font-family</span>: <span style="color:#fcc146;">&quot;Oswald&quot;</span>, <span style="color:#63cce3;">Helvetica</span> Neue;<br />
&nbsp;&nbsp;<span style="color:#3beb2a;">font-size</span>: <span style="color:#6f4ebc;">72px</span>;<br />
&nbsp;&nbsp;<span style="color:#3beb2a;">text-align</span>: <span style="color:#63cce3;">center</span>;<br />
&nbsp;&nbsp;<span style="color:#3beb2a;">color</span>: <span style="color:#6f4ebc;">#3C8FFF</span>;<br />
}<br />
<br />
h2 {<br />
&nbsp;&nbsp;<span style="color:#3beb2a;">font-size</span>: <span style="color:#6f4ebc;">36px</span>;<br />
&nbsp;&nbsp;<em><span style="color:#838c95;">/*color: gray;*/</span></em><br />
}<br />
<br />
p {<br />
&nbsp;&nbsp;<span style="color:#3beb2a;">font-family</span>: <span style="color:#fcc146;">&quot;Crimson Text&quot;</span>, <span style="color:#63cce3;">Georgia</span>;<br />
&nbsp;&nbsp;<span style="color:#3beb2a;">font-size</span>: <span style="color:#6f4ebc;">22px</span>;<br />
&nbsp;&nbsp;<span style="color:#3beb2a;">line-height</span>: <span style="color:#6f4ebc;">1</span>.<span style="color:#6f4ebc;">5</span>;<br />
&nbsp;&nbsp;<span style="color:#3beb2a;">margin-left</span>: <span style="color:#6f4ebc;">10%</span>;<br />
&nbsp;&nbsp;<span style="color:#3beb2a;">margin-right</span>: <span style="color:#6f4ebc;">10%</span>;<br />
}</div></div>
<br>
<br>
</div>



            
          
!
            
              h1, h2, h3, h4 {
  font-family:"Oswald", Helvetica Neue !important;
  font-size: 72px;
  text-align: center;
  color: #3C8FFF !important;
}

h2 {
  font-size: 36px !important;
  /*color: gray;*/
}

h4 {
	font-size: 18px !important;
}

p {
  font-family: "Crimson Text", Georgia;
  font-size: 22px;
  line-height: 1.5;
  margin-left: 10% !important;
  margin-right: 10% !important;
}


            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console