Is there a (free of charge) predefined CSS library for C# code formatting available? I want to display my C# <code> blocks in a web page similar to the way it is displayed in visual studio or even Stackoverflow.

<code class="lang-csharp">
//pretty formatted code

1 Answer 1


I use http://alexgorbatchev.com/SyntaxHighlighter/ on my website. It is a JavaScript library that adds syntax highlighting to code blocks on your page. It supports C# as well as most other programming languages.


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.