tonymx227
tonymx227

Reputation: 5451

HTML code into README.md on Github

I tried to put some HTML snippets into my README.md on Github but the HTML codes are parsed.

How do I do it?

<h2>Example of code</h2>

<pre>
    <div class="container">
        <div class="block two first">
            <h2>Your title</h2>
            <div class="wrap">
                //Your content
            </div>
        </div>
    </div>
</pre>

Upvotes: 58

Views: 49653

Answers (1)

Ivan Zuzak
Ivan Zuzak

Reputation: 18762

Try putting your HTML snippet inside an ```HTML block like this:

```html
<h2>Example of code</h2>

<pre>
    <div class="container">
        <div class="block two first">
            <h2>Your title</h2>
            <div class="wrap">
            //Your content
            </div>
        </div>
    </div>
</pre>
```

Upvotes: 107

Related Questions