I have a code examples website and want to display code with the correct colours see example below,
https://www.w3schools.com/howto/tryit.asp?filename=tryhow_syntax_highlight
When I try this and duplicate the ID the first ID works but the second and third don’t,
I have tried both,
w3CodeColor(document.getElementById("myDiv"));
w3CodeColor(document.getElementByClassName("myDiv"));
<div class="myDiv"> demo code goes here</div>
6