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=" One" rel="stylesheet" typ="css/text">
 <div class="container text-center">
  <h1>Search for anything on Wikipedia</h1><br>
  <input class="form-control" type="text" id="searchTerm" /><br><br>
  <button id="search" type="button" class="btn btn-primary" target="_blank">Search</button><br><br>
	<!-- random article -->
  <p><a href="" target="_blank">
    <button type="button" id="random" class="btn btn-primary">Go Random</button></a></p>
   <ul id="output">

 <!-- container -->


                body {
	background-image: url("");
	background-repeat: no-repeat;
	background-color: #203556;
	color: white;
	padding: 100px; 
	font-family: "Pauta One", sans-serif;

#searchTerm {
	width: 50%;
	margin: 0px 280px;
	border: 5px solid #7c7f84;
  border-radius: 10px;

#search {
	border: 5px solid #7c7f84;
  border-radius: 30px;

#random {
	border: 5px solid #7c7f84;
  border-radius: 30px;



                /* This programme allows the user to search for any Wikipedia value and 
receive 10 immediate results, using the Wikipeida API. It also enables
a random value request */ 

	// run call when search button is clicked
		var searchTerm = $("#searchTerm").val();
		// API url with searchTerm
		var url = "" + searchTerm + "&format=json&callback=?";
		// call Wikipedia API for data
				type: "GET", 
				url: url, 
				async: false, 
				dataType: "json", 
				success: function(data){					
 				// start with fresh and blank info
					// iterate through data from API and output to screen
					for (var i = 0; i < data[1].length; i++){
						$("#output").prepend("<br><div class='well'><a target='_blank' href= " + data[3][i] + data[1][i] + "</a><p>" + data[2][i] + "</p></div>");
				error: function(errorMessage){
					alert("Could not retrieve data");
	// make enter key trigger search function as well
		if (e.which == 13){