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

              
                <header class="primary-bg">
  <div>
    <h1>A Style Guide</h1>
    <h3>Raleway Monochrome</h3>
<nav role='navigation' class="text-white">
  <ul>
    <li><a href="#color">colors</a></li>
    <li><a href="#typography">typography</a></li>
    <li><a href="#buttons">buttons</a></li>
    <li><a href="#forms">forms</a></li>
    <li><a href="#backgrounds">backgrounds</a></li>
  </ul>
</nav>  
  </div>
</header>

<main>
  <article id="color">
    <p class="alt-color">color palette</p>
    <div class="box primary-bg">
      <p>Primary</p>
      <p>[ for backgrounds ]</p>
    </div>
    <div class="box alt-bg">
      <p>Alt Background</p>
      <p>[ for contrast + hovers ]</p>
    </div>
    <div class="box alt-color">
      <p>Alt Color for Links & Headings</p>
      <h4 class="alt-color"></h4>
      <p>[ for <a href="/">links</a> ]</p>
    </div>
    <div class="box">
      <p>Paragraph Text </p>
    </div>
   </article> 

   <article id="typography">
      <p class="alt-color">general typography</p>
      <h3>Font at 600 for headings</h3>
      <p>Font at normal for body text</p>
      <br />
      <p>Primary font: 'Raleway', sans-serif;</p>
      <p><em>Italics: 'Raleway', sans-serif;</em></p>
      <p><strong>Bold: 'Raleway', sans-serif;</strong></p>
      <p><u>Underline: 'Raleway', sans-serif;</u></p>
      <br />
   </article>

    <article id="headings">
      <p class="alt-color">headings</p>
      <h1>headings 1</h1>
      <h2>headings 2</h2>
      <h3>headings 3</h3>
      <h4>headings 4</h4>
      <h5>headings 5</h5>
      <h6>headings 6</h6>    
    </article>

    <article id="paragraphs">
      <p class="alt-color">paragraphs</p>
      <p class="lead">This is a lead paragraph.</p>
      <p>This is an <b>ordinary paragraph</b> that is <i>long enough</i> to wrap to <u>multiple lines</u> so that you can see how the line spacing looks.</p>
      <p>A paragraph (from the Greek paragraphos, "to write beside" or "written beside") is a self-contained unit of a discourse in writing dealing with a particular point or idea. A paragraph consists of one or more sentences. Though not required by the syntax of any language, paragraphs are usually an expected part of formal writing, used to organize longer prose.</p>
      <p><small>This is text in a small wrapper.</small></p>
      <p class="text-muted">Muted color paragraph.</p>
    </article>

    <article>
      <p class="alt-color">inline elements</p>

      <p><a href="#">This is a text link</a></p>

      <p><strong>Strong is used to indicate strong importance</strong></p>

      <p><em>This text has added emphasis</em></p>

      <p>The <b>b element</b> is stylistically different text from normal text, without any special importance</p>

      <p>The <i>i element</i> is text that is set off from the normal text</p>

      <p>The <u>u element</u> is text with an unarticulated, though explicitly rendered, non-textual annotation</p>

      <p><del>This text is deleted</del> and <ins>This text is inserted</ins></p>

      <p><s>This text has a strikethrough</s></p>

      <p>Superscript<sup>®</sup></p>

      <p>Subscript for things like H<sub>2</sub>O</p>

      <p><small>This small text is small for for fine print, etc.</small></p>

      <p>Abbreviation: <abbr title="HyperText Markup Language">HTML</abbr></p>

      <p>Keyboard input: <kbd>Cmd</kbd></p>

      <p><q cite="https://developer.mozilla.org/en-US/docs/HTML/Element/q">This text is a short inline quotation</q></p>

      <p><cite>This is a citation</cite>

      </p><p>The <dfn>dfn element</dfn> indicates a definition.</p>

      <p>The <mark>mark element</mark> indicates a highlight</p>

      <p><code>This is what inline code looks like.</code></p>

      <p><samp>This is sample output from a computer program</samp></p>

      <p>The <var>variable element</var>, such as <var>x</var> = <var>y</var></p>
    </article>

  <article id="buttons">
      <button class="large">large button</button>
      <button class="medium">medium button</button>
      <button class="medium primary-bg">medium button</button>
      <button class="medium alt-bg">medium button</button>
  </article>

    <article id="forms">
      <p class="alt-color">Forms</p>

      <div class="inner" id="radio">
      <form class="topLabel">  
      <span class="field-wrapper">
      <input id="Field1_0" name="Field1" type="radio" class="field radio" value="Fantasty" checked="checked" />
      <label class="choice" for="Field1_0" >
      Radio Option 1
      </label>
      </span>
      <span class="field-wrapper">
      <input id="Field1_1" name="Field1" type="radio" class="field radio" value="Sci-Fi" />
      <label class="choice" for="Field1_1" >
      Radio Option 2
      </label>
      </span>
      <span class="field-wrapper">
      <input id="Field1_2" name="Field1" type="radio" class="field radio" value="Don&#039;t make me choose!" />
      <label class="choice" for="Field1_2" >
      Radio Option 3
      </label> 
      </span>
      </div>

      <div class="inner" id="checkbox">
      <span class="field-wrapper">
      <input type="checkbox"  checked="checked" value="" id="checkbox1" />           <label class="checkbox" for="checkbox1">
      Checkbox Option 1
      </label>
      </span>
      <span class="field-wrapper">

      <input type="checkbox" value="" id="checkbox2" />
      <label class="checkbox" for="checkbox2">
        Checkbox Option 2
      </label>
      </span>
      <span class="field-wrapper">

      <input type="checkbox" value="" id="checkbox3" />
      <label class="checkbox" for="checkbox3">
        Checkbox Option 3
      </label>
      </span>
      </form>
      </div>

      <div class="inner" id="forms">
        <form action="" method="post" class="wpcf7-form" novalidate="novalidate">
        <div class="field-wrapper">
          <label for="yourname" class="float-label">Name</label>
          <span class="your-name"><input type="text" name="your-name" value="" size="40" class="" id="yourname" aria-required="true" aria-invalid="false" placeholder="Name"></span> 
        </div>
        <div class="field-wrapper">
          <label for="youremail" class="float-label">Email</label>
          <span class="wpcf7-form-control-wrap your-email"><input type="email" name="your-email" value="" size="40" id="youremail" aria-required="true" aria-invalid="false" placeholder="Email"></span> 
        </div>
        <div class="field-wrapper">
          <label for="yourmessage" class="float-label">Message</label>
          <span class="your-message">
            <textarea name="your-message" cols="40" rows="10" id="yourmessage" aria-invalid="false" placeholder="Message">
            </textarea></span>
        </div>
        <div class="field-wrapper">
        <input type="submit" value="Send" class="wpcf7-form-control wpcf7-submit">
        </div>
        </form>
      </div>
    </article>

    <article id="backgrounds">
      <p class="alt-color">backgrounds</p>
      <div class="article primary-bg">
        <h1>Primary-bg: This is a heading</h1>
        <p class="lead">This is a lead paragraph.</p>
        <p>This is an <b>ordinary paragraph</b> that is <i>long enough</i> to wrap to <u>multiple lines</u> so that you can see how the line spacing looks.</p>
        <p>A paragraph (from the Greek paragraphos, "to write beside" or "written beside") is a self-contained unit of a discourse in writing dealing with a particular point or idea. A paragraph consists of one or more sentences. Though not required by the syntax of any language, paragraphs are usually an expected part of formal writing, used to organize longer prose.</p>
        <p><small>This is text in a small wrapper.</small></p>
        <p class="text-muted">Muted color paragraph.</p>
      </div>

      <div class="article alt-bg">
        <h1>Alt-bg: This is a heading</h1>
        <p class="lead">This is a lead paragraph.</p>
        <p>This is an <b>ordinary paragraph</b> that is <i>long enough</i> to wrap to <u>multiple lines</u> so that you can see how the line spacing looks.</p>
        <p>A paragraph (from the Greek paragraphos, "to write beside" or "written beside") is a self-contained unit of a discourse in writing dealing with a particular point or idea. A paragraph consists of one or more sentences. Though not required by the syntax of any language, paragraphs are usually an expected part of formal writing, used to organize longer prose.</p>
        <p><small>This is text in a small wrapper.</small></p>
        <p class="text-muted">Muted color paragraph.</p>
      </div>

      <div class="article">
        <h1>This is a heading</h1>
        <p class="lead">This is a lead paragraph.</p>
        <p>This is an <b>ordinary paragraph</b> that is <i>long enough</i> to wrap to <u>multiple lines</u> so that you can see how the line spacing looks.</p>
        <p>A paragraph (from the Greek paragraphos, "to write beside" or "written beside") is a self-contained unit of a discourse in writing dealing with a particular point or idea. A paragraph consists of one or more sentences. Though not required by the syntax of any language, paragraphs are usually an expected part of formal writing, used to organize longer prose.</p>
        <p><small>This is text in a small wrapper.</small></p>
        <p class="text-muted">Muted color paragraph.</p>
      </div>
    </article>
</main>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Raleway:400,300,600,700,800);

body,
html {
  padding: 0;
  margin: 0;
}

*,
*:before,
*:after {
  box-sizing: border-box;
}

/* TYPE: size + shape */
body{
  font: 400 16px/1.2 'Raleway', sans-serif;
  letter-spacing: 0.5px;
}

a {
  color: inherit;
  text-decoration: underline;
}

a:hover {
  color: rgba(0,0,0,0.6);
  text-decoration: underline;
}

.primary-bg {
  background: SteelBlue;
  color: #f8f8f8;
}

.alt-bg {
  background: rgba(70, 130, 180, 0.6);
}

.alt-color {
  color: rgba(70, 130, 180, 0.6);
}

/* STRUCTURE */
header {
  width: 100%;
  padding: 10px 10px 30px;
  margin: 0 0 30px;
  text-align: center;
}

header nav ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

header nav ul li {
  display: inline;
  padding-right: 10px;
}

header nav ul li:last-of-type {
  padding-right: 0;
}

main {
  max-width: 900px;
  margin: 10px auto;
}

article,
.article {
  display: block;
  margin: 30px 0; 
  padding: 30px;
}

article h1,
article p {
  max-width: 600px;
}

.box {
  width: 25%;
  float: left;
  height: 200px;
  padding: 10px;
}

.box:before,
.box:after,
article:before,
article:after{
  content: '';
  display: table;
}

.box:after,
article:after{
  clear: both;
}

/* BUTTONS */
button{
  background: rgba(0,0,0,0.2);
  color: inherit;
  padding: 20px;
  border-radius: 0;
  border: 0;
  margin-right: 10px;
  margin-bottom: 1.5em;
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
}

button:hover{
  background: rgba(0,0,0,0.7);
  color: #fff;
}

button.medium {
  display: inline;
  max-width: 100px;
}

button.large {
  width: 70%;
  display: block;
}

button{
  /* box shadow */
   -webkit-box-shadow: 6px 6px 0 0 #000;  /* Safari 3-4, iOS 4.0.2 - 4.2, Android 2.3+ */
  -moz-box-shadow: 6px 6px 0 0 #000;  /* Firefox 3.5 - 3.6 */
  box-shadow: 4px 4px 0 0 #000;  /* Opera 10.5, IE 9, Firefox 4+, Chrome 6+, iOS 5 */
}

/* FORMS */

.field-wrapper {
  display: block;
  position:relative;
  margin-bottom: 0.25em;
}

label {
  display: block;
  margin-bottom: 1.5em;
}

select, textarea, input[type="text"], input[type="password"], input[type="file"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input, .faux-file {
  display: inline-block;
  padding: 0 .4em 0 .4em;
  padding: .5em;
  vertical-align: middle;
  min-width: 50px;
  max-width: 550px;
}

textarea, input[type="text"], input[type="password"], input[type="file"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"],  .uneditable-input, .faux-file {
  width: 100%;
  min-height: 36px;
  border: 3px solid #000;
  margin: 0 0 1em 0;
  font-family: inherit;  
  font-size: inherit;  
}

textarea:hover,
input[type="text"]:hover,
input[type="email"]:hover,
input[type="submit"]:hover,
textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus {
  background: transparent;
  border: 3px solid #a9a9a9;
}

textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus, 
input[type="submit"] {
  outline: none;
}

/* Radio + Checkbox */
input[type=radio] + label,
input[type=checkbox] + label{  
    display: inline-block;  
    cursor: pointer;  
    position: relative;  
    padding-left: 30px;  
    margin-right: 15px;  
}  

input[type=radio],
input[type=checkbox] {  
    display: none;  
}  

input[type=radio] + label:before,
input[type=checkbox] + label:before{  
    content: "";  
    display: inline-block;  
  
    width: 15px;  
    height: 15px;  
  
    margin-right: 20px;  
    position: absolute;  
    left: 0;  

    bottombottom: 1px;  
    border: 3px solid;  
}  

input[type=radio]:checked + label:before,
input[type=checkbox]:checked + label:before {  
    background: #262626;
    color: #555;  
    font-size: 12px;  
    text-align: center;  
    line-height: 14px; 
}  

input[type=radio] + label:before {  
  border-radius: 50%;
}

input[type=submit]{
  background: #fff;
  border: 3px solid;
  padding: 9px;
  font-family: inherit;  
  font-size: inherit;
  font-weight: inherit;
}

input[type=submit]:hover{
  color: rgba(0,0,0,0.5);
}

              
            
!

JS

              
                
              
            
!
999px

Console