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.


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.


                <div class="container">
		<div class="banner text-center align-items">
			<h1>Wiki Search</h1>
			<p>Search for articles on Wikipedia</p>
		<div class="text-center">
			<input type="search" id="search-box" placeholder="Search Here">
			<div class="buttons">
				<input type="button" onclick="searchWiki()" id="search-button" value="Search">
				<input type="button" onclick="location.href='';" value="Feel Lucky?">
		<div class="articles">
			<ul id="results">


                body {
	margin: 0 auto;

.container {
	margin-top: 50px;
#search-box {
	width: 500px;
	height: 30px;
	margin-bottom: 20px;
	margin-top: 30px;
	    padding-left: 10px;


.articles {
	width: 80;
	margin-top: 50px;
  margin-bottom: 50px;
/*	padding: 20px 0;

ul {


ul li {
	background-color: #E7E7E8;
	list-style-type: none;
    margin-bottom: 10px;
    padding: 15px 30px 5px 30px;

ul h5 {
	font-size: 25px;
	display: block;

ul p {
	font-size: 15px;

ul a{
	text-decoration: none;
		color: black;

ul a:hover 
	color: inherit;

@media all and (max-width:500px){
    width: 300px;
  #results {
    padding: 0;


                const searchBox = document.getElementById('search-box');
	const sButton = document.getElementById('search-button');
	const results = document.getElementById('results');

	window.onload = function() {

	const searchWiki = () => {
		const keyword = searchBox.value;
  fetch("*&action=opensearch&search=" + keyword + "&limit=5", {
    method: "POST",
    headers: {
      "Content-Type": "application/json"
    body: JSON.stringify({ query: event.currentTarget.value })
    .then(response => response.json())
    .then((data) => {
      build(data); // Look at local_names.default

    const build = (data) => {
  	 	let title = data[1];
  		let description = data[2];
  		let url = data[3];
  		results.innerHTML = "";
  	for(let x = 0; x < 5; x++){

  		const item = `<a href="${url[x]}" target="#">
  				results.innerHTML += item;

  	function searchHandle(e){

	searchBox.addEventListener("keyup", function(event) {
    if (event.key === "Enter") {