0

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.

JakeParis
  • 11,056
  • 3
  • 42
  • 65
FlyingCat
  • 14,036
  • 36
  • 119
  • 198
  • That particular guy seems to have done it by hand with html markup. There are also javascript libraries you can use that will do that all for you. – JakeParis May 08 '12 at 03:41

1 Answers1

1

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.

jtpereyda
  • 6,987
  • 10
  • 51
  • 80