HTML code into README.md on Github

GithubMarkdown

Github Problem Overview


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>

Github Solutions


Solution 1 - Github

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>
```

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questiontonymx227View Question on Stackoverflow
Solution 1 - GithubIvan ZuzakView Answer on Stackoverflow