I'm not a front-end developer and have been struggling for hours to get highlight.js to do what I want. Need to display code nicely in a blog. Okay, it works perfectly in that it renders the code I post into
I am assuming that your code file to highlight lives on the webserver.
Here is some HTML/JS code:
Note that this assumes that there is only one
<code> tag in your page.Otherwise step 2 needs to be adjusted.