Alex Rivera | Logout

How to highlight source code in HTML?

Asked 2008-09-16T07:48:51.563
26

I want to highlight C/C++/Java/C# etc source codes in my website.

How can I do this?

Is it a CPU intensive job to highlight the source code?

Edit
Report

1 Answer

5

Pygment is a good Python library to generate HTML, RTF, ANSI (terminal-style) or LaTeX code. It supports a large range of languages (C, C++, Lua, Erlang, ...) and you can even write your own output formatter.

answered 2008-09-16T08:06:19.913

Your Answer