W3.CSSCode
Display Examples
Thew3-panel class is used to display examples in a grey container:
Display Code
Thew3-code class is used to display code in a readable mono-spaced font.
Example
fruits[1] = "Apple";
fruits[2] = "Mango";
fruits[3] = "Plum";
Highlight Inline Code
Thew3-codespan class is used to highlight inline code:
Thehtml element defines an HTML page.
Coloring Code
W3Schools provides a JavaScript library for coloring code.
Example
fruits[1] = "Apple";
fruits[2] = "Mango";
fruits[3] = "Plum";
You can download the library from here:https://www.w3schools.com/lib/w3codecolor.js
If you use the w3codecolor.js library, you can also use the code classes described below:
Highlight JavaScript Code
ThejsHigh class is used to highlight JavaScript code:
Highlight HTML Code
ThehtmlHigh class is used to highlight HTML code:
Highlight CSS Code
ThecssHigh class is used to highlight CSS code:

