# Syntax highlighting ## Setting the language attribute Any `code` block with a `language` attribute will be syntax highlighted. ### Markdown In Markdown, specify the language in the opening line with: ```markdown ​```php ``` _Note: since Markdown also supports embeded HMTL, the above code block will also work in a markdown source file._ ## Result This will result in the following HTML block in the parsed content: ```html
    
        <?php $foo = true;
    
``` _Note: providing a CSS theme that color the code is entirely up to you. You can use any of the official [Prism.js](https://prismjs.com) theme out of the box just by loading the CSS file._ ## Custom syntax highlighting The default Highlighter responsible for syntax highlighting is based on [Prism.js](https://prismjs.com/), but you can provide your own by implementing `Stenope\Behaviour\HighlighterInterface`: ```php public function highlight(string $value, string $language): string; ```