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


Add Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import or require. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.


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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.


  <meta charset="utf-8">
  <title>Wikipedia Viewer</title>
  <link rel="stylesheet" href="./index.css">
  <script src=""></script>
  <!-- Compiled and minified CSS -->
  <link rel="stylesheet" href="">
<link href="" rel="stylesheet">
  <!-- Compiled and minified JavaScript -->
  <script src=""></script>


<body class="container">

  <h1>The Wiki Viewer</h1>

  <form id='searchfor' onsubmit="return false;">
    <div class="input-field col s">
      <input type="text" placeholder="search" name="searchstr" id="search">
      <label for="search">Search</label>
    <button class="btn waves-effect waves-light" type="submit" name="action">Search
      <i class="material-icons right">search</i>
    <button class="btn waves-effect waves-light" type="submit" name="action"  onClick="'')">Random
      <i class="material-icons right"></i>

  <div id="results">


  <script src='index.js'></script>


  // Autocomplete is a jquery ui plugin
    source: function(request, response) {
            url: "",
            dataType: "jsonp",
            data: {
                'action': "opensearch",
                'format': "json",
                'search': request.term
            success: function(data) {
  var wikipedia = ''
  var api = ''

  $('#searchfor').submit(function() {
    var searchstr = $('input[name="searchstr"]').val();
    var url = api + searchstr;
    $.getJSON(url, function(data){
      var results = document.getElementById('results');
      results.innerHTML = ''
      var cont = ''
      for (var i=0;i<data[1].length;i++) {

        cont = `
        <div class="row">
                <div class="col s12 m12">
                  <div class="card blue-grey darken-1">
                    <div class="card-content white-text">
                      <span class="card-title">${data[1][i]}</span>
                    <div class="card-action">
                      <a href="${data[3][i]}" target=_blank>Link here</a>
                  </div> </div>