Markdown code and syntax highlighting

Code blocks

To produce a code block in Markdown, simply insert the code between triple grave accent:

```
// Code goes here
int a=5;
printf ("%d",a);
```

The previous example displays:

int a=5;
printf ("%d",a);

Syntax highlighting

To highlight keywords for a given language, just add the name of the language after the triple grave accent:

``` php
<?php
$var = 12;
echo 'Var='.$var;
?>
```

The previous example displays:

<?php
$var = 12;
echo 'Var='.$var;
?>

Inline

To insert some code inline in the text, add single grave accent before and after:

This `code` is an example of inline

The previous line displays:

This code is an example of inline code insertion.

See also


Last update : 04/13/2019