Tovi Jaeschke


Recent posts:

How to add syntax highlighting to your website

When running a programming blog, you are going to need to show some code. To make this look appealing, and easy for people to read, you should add syntax highlighting to your code.

First, select what code you want to support

And download the prism syntax code highlighting here Then link it to your website like this:

        <link rel="stylesheet" type="text/css" href="css/prism.css"/>
        <script src="js/prism.js"></script>
    <p>After you have linked the files, you can use prism with this code syntax:</p>
        <code class="language-<language>">
			Code Goes here!

You can also add other plugins, such as line numbers, show tabs and spaces, automatically link url's and emails, and WebPlatform Docs