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.

1
  • 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. Commented May 8, 2012 at 3:41

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.