+ 1
w3schools has editors for many different languages. Can you share a link to a specific Try it yourself section in w3schools?
If you want to see a web-based JavaScript editor, you can see how I used CodeMirror with:
https://code.sololearn.com/WCuL2WGCwUjm/
That supports syntax highlighting. Unrelated to CodeMirror, I turn the JavaScript into a graph as you edit it in real-time.