Pen Settings



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


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.


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.


  <div class= "container">
  <h1> <img class="img-responsive img-rounded center-block" src=""> </h1> 
  <a href = "" target ="_blank"><h2 class= "text-center"> Click here for a random Wikipedia article </h2></a>
    <div class="text-center">
        <input type="text" id="searchTerm"  size="25" placeholder="Search for anything!">
      <button id="search" class = "btn btn-primary"> Search</button>
     <b> <div id="result-page">


  background-color: lightgray;
  margin: 2%;
  padding: 20px;
  padding: 20px;
  font-size: 110%;
  font-family: helvetica;
/*.img-responsive {
    margin: 0 auto;
} /*position img to the center*/



//Create an click function html for Search button that when user clicks on it, ajax will make a request to the server
    var searchWord = $("#searchTerm").val(); //get values from the input box
   //add the user input string and append it to the example string. i.e replace main page with the user input
	type: "GET",
        // the URL to which the request is sent
	url: "",
        // data to be sent to the server
	data: { action:'query', format: 'json', list: 'search', srsearch: searchWord, prop: 'extracts'}, 
        // The type of data that you're expecting back from the server
	dataType: 'json', 

        // do something with the data with success: display the heading and texts
	success: function( data ){ (item) {
    $("#result-page").append('<div class= "jumbotron" ><a style="font-size:130%" href="'+ item.title+ '"target="_blank">' + item.title + "</a><p>" + item.snippet + "</p></div>");