W3.CSS Code
Displaying Examples
The w3-example class is designed to display examples in a grey container:
Displaying Code
The w3-code class is designed for displaying code.
It displays code with a well readable mono-spaced font.
Example
fruits[0] = "Banana";
fruits[1] = "Apple";
fruits[2] = "Mango";
fruits[3] = "Plum";
Code Coloring
W3Schools provides a JavaScript library for coloring code.
Example
fruits[0] = "Banana";
fruits[1] = "Apple";
fruits[2] = "Mango";
fruits[3] = "Plum";
You can download the library from here: http://www.w3schools.com/lib/w3codecolor.js
Displaying JavaScript
Use the jsHigh class together with w3-code to highlight JavaScript code.
Displaying HTML
Use htmlHigh together with w3-code to highlight HTML code.
Displaying CSS
Use cssHigh together with w3-code to highlight CSS code.
Codespan
The w3-codespan class is used to highlight "inline code" with a pink background-color.



