html css prismjs
Written: Jul-2023
Implementing a PrismJS code viewer
Link : https://prismjs.com
The PrismJS code syntax highligher+ is a great tool for presenting non-editable javascript, css, php, html, etc languages.
Prerequisites
Firstly, you need to create a download from prismjs.com including your chosen languages and preferences.Then include the files into your page
html
Coding
Now you need the following
html :: in-line snippets
or
html :: multi-line snippets
or ...
html :: multi-line with line-numbers
if using ajax, where the code may not be presented after the prismjs onload applies, then you can use
js
Note, to see line numbers - Prism.highlightAll();
must be called