[英]How to create HTML block of code in readme.md?
I want to replace markdown syntax into html tags in my readme.md
file. 我想将markdown语法替换为我的
readme.md
文件中的html标记。
In order to replace the inline code ( single backtics ` ) `let a = 10;`
I use <code></code>
html tag. 为了替换内联代码(单行代码`),
`let a = 10;`
我使用<code></code>
html标签。
How can I replace the markdown code blocks ( triple backtips ``` ) with html tag? 如何用html标记替换markdown代码块(三个后提示```) ?
Is there any equivalent? 有什么等效的吗?
<blockquote>
, <samp>
, <kbd>
seems not to work on github.com
or npmjs.com
<blockquote>
, <samp>
, <kbd>
似乎在github.com
或npmjs.com
I'm not sure if I understand, but if I do, in most cases, code blocks in HTML are done by nesting <code>
in <pre>
, so like this: 我不确定我是否理解,但是如果可以,大多数情况下,HTML中的代码块是通过将
<code>
嵌套在<pre>
,如下所示:
<pre>
<code>
Whatever code you want to show
</code>
</pre>
Keep in mind, how it looks like depends on CSS for pre code
请记住,它的外观取决于
pre code
CSS
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.