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

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

              
                <div>
  <h1>Writer's Un<span class="block">block</span></h1>
  <span class="subtitle">A creative app to help with writer's block.</span>
  <hr>
  <span class="about"><br/>When you load the page, you will see two completely random and unrelated English words appear on the screen. Use these word prompts to get your creative juices flowing and get an idea for a story, poem, or some other form of content. If you want a new prompt, just click "new words" and a fresh prompt will appear.</span>
  <span id="spacer"></span>
  <dt></dt>
  <dd></dd>
  <p>new words</p>
  <span class="creds">Made with &hearts; by <a href="http://kennethalvares.com" target="_new" style="color: #fff;">Kenneth Alvares</a>
</div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Pacifico')
@import url('https://fonts.googleapis.com/css?family=Lato')
  
body
  background-color: #669999
  color: #e0ffff
  font-family: 'Lato', sans-serif
  
dt
  display: none
  font-size: 60px
  font-weight: 400
  max-width: 100vw
  max-height: 100vh
  
dd
  display: none
  font-size: 26px
  font-weight: 100
  max-width: 100vw
  max-height: 100vh
  
  
p
  display: none
  color: #334f4f
  border-radius: 7px
  border: 3px solid #334f4f
  font-size: 24px
  text-decoration: none
  padding: 7px
  margin-left: 40px
  font-family: 'Lato', sans-serif
  &:hover
    background-color: #334f4f
    color: #669999
  
div
  text-align: center
  height: 97.7vh
  display: flex
  flex-direction: column
  align-items: center
  
hr
  width: 75%
  display: none
  
.subtitle
  display: none
  
h1
  font-family: 'Lato', sans-serif
  display: none
  letter-spacing: 5px
  
.block
  margin: 1px
  border: 2px solid #e0ffff
  background-color: #e0ffff
  color: #669999
  font-family: 'Pacifico', cursive
  padding: 7px
  padding-top: 0
  padding-bottom: 0
  border-radius: 5px
  
.about
  width: 75%
  display: none
  
#spacer
  height: 100px
  
.creds
  display: none
              
            
!

JS

              
                jQuery(document).ready(function($) {
  $('h1').fadeIn(2000);
  $('.about').fadeIn(2000);
  $('.subtitle').fadeIn(2000);
  $('hr').fadeIn(2000);
  $('p').fadeIn(3000);
  $('.creds').fadeIn(3000);
 $.get('https://raw.githubusercontent.com/dwyl/english-words/master/words_alpha.txt', function(data) {
        var quotes = data.split("\n");
        var idx = Math.floor(quotes.length * Math.random());
        $('dt').html(quotes[idx]).fadeIn(3000);
   });
  $.get('https://raw.githubusercontent.com/dwyl/english-words/master/words_alpha.txt', function(data) {
        var quotes = data.split("\n");
        var idx = Math.floor(quotes.length * Math.random());
        $('dd').html(quotes[idx]).fadeIn(3000);
   });
});

$("p").click(function(){
  $('dt').fadeOut(500)
  $('dd').fadeOut(500)
  $('p').fadeOut(500)
  var delay = 500;
  setTimeout(function() {
    $.get('https://raw.githubusercontent.com/dwyl/english-words/master/words_alpha.txt', function(data) {
        var quotes = data.split("\n");
        var idx = Math.floor(quotes.length * Math.random());
        $('dt').html(quotes[idx]).fadeIn(500);
   });
  $.get('https://raw.githubusercontent.com/dwyl/english-words/master/words_alpha.txt', function(data) {
        var quotes = data.split("\n");
        var idx = Math.floor(quotes.length * Math.random());
        $('dd').html(quotes[idx]).fadeIn(500);
    $('p').fadeIn(500);
   });
      }, delay);
});
              
            
!
999px

Console