代码

这里教你如何使用 bootstrap 来展示多行代码

行内代码

<code> 里编写行内代码,请务必转义HTML的尖括号。

For example, <section> should be wrapped as inline.
For example, <code>&lt;section&gt;</code> should be wrapped as inline.

大段引用

<pre> 里编写多行代码。 再次确保在代码中转义任何尖括号以进行正确渲染。 你可以选择添加 .pre-scrollable 类,它将设置最大高度为340px并提供y轴滚动条。

<p>Sample text here...</p>
<p>And another line of sample text here...</p>
<pre><code>&lt;p&gt;Sample text here...&lt;/p&gt;
&lt;p&gt;And another line of sample text here...&lt;/p&gt;
</code></pre>

变量

使用 <var> 标记变量。

y = mx + b
<var>y</var> = <var>m</var><var>x</var> + <var>b</var>

按钮

你可以使用 <kbd> 来标记键盘上的按钮,这看起来很生动。

To switch directories, type cd followed by the name of the directory.
To edit settings, press ctrl + ,
To switch directories, type <kbd>cd</kbd> followed by the name of the directory.<br>
To edit settings, press <kbd><kbd>ctrl</kbd> + <kbd>,</kbd></kbd>

输出

使用 <samp> 标签来展示可能的输出结果

This text is meant to be treated as sample output from a computer program.
<samp>This text is meant to be treated as sample output from a computer program.</samp>