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


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


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.


                <!-- Mission Parameters:
  1. Can search Wikipedia entries in a search box and see the resulting Wikipedia entries.
  2. Can click a button to see a random Wikipedia entry.
<link href='|Droid+Serif' rel='stylesheet' type='text/css'>

<div class="container">
  <div class="searchDiv">
    <h1 class="text-center">Wikipedia Viewer</h1>
    <form role="form" action="#" class="form-horizontal">
      <div class="form-group">
        <div class="col-xs-offset-2 col-md-offset-3 col-xs-8 col-md-6">
          <label class="control-label sr-only" for"topic">Search Topic:</label>
          <i class="glyphicon glyphicon-search"></i>
          <input type="search" class="form-control" id="topic" onkeypress="handle(event)">
      <div class="buttons">
        <button type="button" class="btn btn-default" id="search">Search!</button>
        <a href="" target="_blank" class="btn btn-default">Surprise!</a>
  <div id="numResults"></div>
  <div id="results"></div>



                body {
  background-color: #29a329;

h1 {
  color: white;
  font-size: 60px;
  font-family: 'Raleway', serif;

#topic {
  padding-left: 30px;

.glyphicon {
  position: absolute;
  left: 15px;
  padding: 10px;
  pointer-events: none;

.buttons {
  display: table;
  margin: 0 auto;

#numResults p {
  color: white;

#title {
  font-size: 24px;
  font-family: 'Droid Serif', serif;
  color: black;

#results a {
  text-decoration: none;

#results div {
  background-color: white;
  border-radius: 40px;
  padding: 10px 10px 5px 20px;
  margin-bottom: 10px;

#results p {
  color: black;


  function handle(e){
    return false; // disable 'Enter' key
  $("#search").on("click", function(){
    var topic = $("#topic").val();
    var topicURI = topic.replace(/\s+/g, "+").toLowerCase(); // URI-friendly
    var apiURL = ""+topicURI;
    $.getJSON(apiURL, function(data){
      $("#numResults").append("<p>Found "+data.query.searchinfo.totalhits+" articles</p>");
      $.each(, function(i, entry){
        $("#results").append($("<a href='"+encodeURIComponent(entry.title)+"' target='_blank'><div class='article'><span id='title'>"+entry.title+"</span><br><p>"+entry.snippet+"...</p></div></a>").hide().delay(200*i).fadeIn(500));  // fadeIn each <a> one after the other
      }); // /.each()
        $(this).css("box-shadow" , "0px 0px 10px 2px black");
        $(this).css("box-shadow" , "0 0 0 0");
    }); // /.getJSON()
  }); // /.on()