我尝试将一些 HTML 片段放入 Github 上的 README.md 中,但 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>
最佳答案
尝试将 HTML 代码片段放入 ```HTML
block 中,如下所示:
```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>
```
关于github - HTML 代码放入 Github 上的 README.md 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16350545/