Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

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.

+ 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

Auto Save

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>Intro to front-end web development</h1>
<div class="columns">
  <article>
    <h2>What is HTML?</h2>
    <p>
      <a href="https://www.w3.org/TR/html5">HTML</a> is the language used to create the web pages you visit everyday. It provides a logical way to structure content for web pages.
    </p>
    <p>
      Let's analyze the acronym "HTML", as it contains a lot of useful information. HTML stands for HyperText Markup Language.
    </p>
    <p>
      A markup language is a computer language that defines the structure and presentation of raw text. Markup languages work by surrounding raw text with information the computer can interpret, "marking it up" for processing.
    </p>
    <p>
      HyperText is text displayed on a computer or device that provides access to other text through links, also known as "hyperlinks".
    </p>
  </article>
  <article>
    <h2>What is CSS?</h2>
    <p>
      CSS, or Cascading Style Sheets, is a language that web developers use to style the HTML content on a web page. If you're interested in modifying colors, font types, font sizes, shadows, images, element positioning, and more, CSS is the tool for the job!
    </p>
    <img src="https://c1.staticflickr.com/1/537/32398153402_2a7028b2bd_z.jpg" alt="A drawing of an empty browser window">
    <p>
      Although the <code>&lt;style&gt;</code> element allows you to write CSS code within HTML files, this mixture of HTML and CSS can result in code that is difficult to read and maintain.
    </p>
    <p>
      It's common for developers to add substantial amounts of custom CSS styling to a web page. When all of that CSS code is placed within a &lt;style&gt; element in an HTML file, you risk the following two things:
    </p>
    <ol>
      <li>Creating a large HTML file that is difficult to read and maintain (by you and other developers). Overall, this can result in an inefficient workflow.</li>
      <li>Maintaining a clear distinction between web page structure (HTML) and web page styling (CSS).</li>
    </ol>
    <p>
      Fortunately, the following solution will help you avoid creating large HTML files that mix in CSS code: a CSS file!
    </p>
    <p>
      HTML files are meant to contain only HTML code. Similarly, CSS files are meant to contain only CSS code. You can create a CSS file by using the .css file name extension, like so: style.css
    </p>
    <p>
      With a CSS file, you can write all the CSS code needed to style a page without having to sacrifice the readability and maintainability of your HTML file.
    </p>
  </article>
</div>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console