Reputation: 14250
I was wondering how to create Code Editor Style in html page like this one. http://www.tonymarston.net/php-mysql/databaseobjects.html
He has different colors for different variables and strings. He used <pre>
and <span>
to style but I am not sure if there are faster ways to do this. Any thoughts? Thanks a lot.
Upvotes: 0
Views: 187
Reputation: 7385
I haven't used it myself, but Stackoverflow uses Prettify (according to this question). It seems to have been built with only JavaScript and CSS.
Upvotes: 1