Code Highlight

A few examples of syntax highlighted code inside of decks

JavaScript



var a = 'hello';
var b = 'world';

function c() {
  return a + b;
}

document.innerHTML += c();

CSS



.button.negative {
  background: #ff0000;
  color: #fff;
  font-weight: 500;
}

Fragments in Code



var a = 'hello';
var b = 'world';

function c() {
  return a + b;
}

document.innerHTML += c();

PHP

 <?php
      $count = 0;     // Set count equal to 0
      $_xval = 5;
      $_yval = 1.0;
      $some_string = "Hello There!";
 ?>

C++ Template


// Induction 
 
template <int N> 
struct Factorial {
  static const int value = N * Factorial<N - 1>::value;
};
 
// Base case via template specialization:
 
template <>
struct Factorial<0> {
  static const int value = 1;
};

Sample: Code Highlight

By Hakim El Hattab

Sample: Code Highlight

A few examples of syntax highlighted code inside of decks.

  • 3,104