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


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.


                <!-- hyperlinks: target="_blank" for -->
  <div class="h-100 d-flex justify-content-center align-content-between flex-wrap">
    <div class="container text-center p-3">
      <span><em>An alternative Wikipedia landing page.</em></span>
      <p id="message" class="text-red"></p>
      <div class="row justify-content-center">
        <div class="col-12 col-sm-6 col-md-7 col-lg-8 py-0 py-sm-3 text-right">

          <div class="input-group">
            <input id="search-keywords" type="text" class="form-control" placeholder="Search for an article...">
            <span class="input-group-btn">
              <button id="search-btn" class="btn btn-warning">Go!</button>

        <div class="col-12 col-sm-1 col-md-1 col-lg-1 py-1 align-self-center text-center">
        <div class="col-12 col-sm-5 col-md-4 col-lg-3 pt-0 pb-3 py-sm-3 text-center text-sm-left">
          <a href="" target="_blank">
            <button type="button" class="btn btn-warning">Get a Random Entry!</button>

    <div class="container mx-2">
      <div id="search-results" class="list-group row">

    <div class="container p-3 w-100">
      <p class="text-center">Coded by <a class="text-danger" href="">Greg Wong</a></p>


                html, body {
  height: 100%;
  background-color: #FFE3B7;

.content-entry {
  background-color: #FFEFD6;
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgb(223,223,223);
  color: #603B01;

.content-entry:focus, .content-entry:hover {
  background-color: #FFD695;
  color: #A06200;

.text-red {
  color: red;



                $('input#search-keywords').keypress(function (e) {
    var code = e.keyCode || e.which;
    if (code === 13){


function searchStart(){
  var keywords = $("input#search-keywords").val();
  if (keywords != ""){
    var url = ""+keywords +"&callback=?";
      $("p#message").text("Search results failed to load. Try again later!").effect("shake");
  else {
    $("p#message").text("Search bar is empty!");

function searchDone(json){
    var entries = "";
    var pages = json.query.pages;
    for (var pageid in pages){
      var href = "" + pageid ;
      var title = pages[pageid].title;
      var extract = pages[pageid].extract;
      var entry = '<a href="' + href + '" class="list-group-item content-entry" target="_blank"><h5 class="w-100">' + title + '</h5><span>' + extract + '</span></a>';
      entries = entries.concat(entry);
    $("div#search-results").empty().append(entries).hide().fadeIn("slow", function() { });

$('div#search-results').on('click', 'a.content-entry',function(){
  // without this, the selected entry stays highlighted