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 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


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.


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.


                <link href="|Duru+Sans|Imprima|Maitree|Quattrocento+Sans|Quicksand|Revalia" rel="stylesheet">

 <div class = "container">
    <h1 class = "text-center">Wikipedia Viewer</h1>
      <div class = "row">
        <div class = "col-xs-6 col-xs-offset-3">
           <div class = "form-group">
              <input name = "title" type = "text" id = "title" class = "form-control" placeholder = "What do you want to search for?">
           </div><!---end form-group-->

            <div class = "form-group">
              <input type = "submit" id = "submit" class = "btn btn-primary col-xs-offset-3 col-xs-6 col-sm-6 col-sm-offset-3" value = "Search">
            </div><!--end form-group-->
        </div><!--end col-xs-8-->
     </div><!--end row-->
   <div class = "row">
     <p class = "text-center random"><a href = "" target = "_blank">Search Randomly</a></p>
   </div><!--end random-->
    <div class = "search col-xs-8 col-xs-offset-2">
    </div><!--end serach result-->
 </div><!--end container-->


                body {
  font-family: Maitree;
  background: 	#193f70;
  color: white;

a:link {
  color: #a6b8db;

a:visited {
  color: #53a4c1

a:hover {

a:active {

.random {
  margin-top: 15px;

/* .content {
  color: white;
} */


                $(document).ready(function() {
  $("#submit").on("click", function(e) {
     var title = $('#title').val();
     var link = "*&srsearch=" + title + "&format=json";
      success: function (json) {
                  $(".search").empty();// first empty all the child node om the div
                  //loop through the api result and extarcts valuable data
                  for(i = 0; i <; i++) {
                    var header =[i].title;
                    var link_header = "" + header;
                    var content =[i].snippet;
                    $(".search").append("<h3><strong><a target = '_blank' href = '" + link_header + "'" + ">" + header +  "</a></strong></h3>");
                    $(".search").append("<p class = 'content'>" + content + "</p>");
                  }//end for
      error: function(errorMessage) {
   });//end ajax call
  });//end click
});//end document ready

// $.ajax( {
//     url: "",
//     data: queryData,
//     dataType: 'json',
//     type: 'POST',
//     headers: { 'Api-User-Agent': 'Example/1.0' },
//     success: function(data) {
//        // do something with data
//     }
// });