Simple Highlight

Fork me on GitHub

This is an example page showing usage of syntax highlighting library - Simple Highlight for different languages and how dark and light themes are looks like.
More details about usage and features you can find on project GitHub page

Javascript Syntax

Dark Theme

/**
 * Good doggo class
 */
class Dog extends Animal {
  bark(times) {
    const text = new Array(times).fill('Bark!');
    console.log(text);
  }

  isGoodBoy() {
    return true;
  }
}

function Hello(world) {
  return 'Hello ' + world;
}
    

Light Theme

/**
 * Good doggo class
 */
class Dog extends Animal {
  bark(times) {
    const text = new Array(times).fill('Bark!');
    console.log(text);
  }

  isGoodBoy() {
    return true;
  }
}

function Hello(world) {
  return 'Hello ' + world;
}
    

HTML Syntax


    

    

CSS Syntax

#main {
  margin: auto;
  border: 2px solid #ccc;
}

.item-list a {
  text-decodation: none;
  color: #f7f7f7;
  font-family: 'Arial';
}
    
#main {
  margin: auto;
  border: 2px solid #ccc;
}

.item-list a {
  text-decodation: none;
  color: #f7f7f7;
  font-family: 'Arial';
}
    

Inlined styles and javascript