代碼
使用 Bootstrap 顯示內聯和多行代碼塊的文檔和示例。
內聯代碼
用 .包裹內聯代碼片段<code>。請務必轉義 HTML 尖括號。
       例如, 
      
 
     <section>應包裝為內聯。 
     For example, <code><section></code> should be wrapped as inline.代碼塊
將<pre>s 用於多行代碼。再次,確保轉義代碼中的任何尖括號以進行正確渲染。您可以選擇添加.pre-scrollable該類,它將設置最大高度為 340 像素並提供一個 y 軸滾動條。
<p>Sample text here...</p>
<p>And another line of sample text here...</p>
<pre><code><p>Sample text here...</p>
<p>And another line of sample text here...</p>
</code></pre>變量
對於指示變量,請使用<var>標籤。
 
      y = 
       m 
      x + 
       b 
     
 
     <var>y</var> = <var>m</var><var>x</var> + <var>b</var>用戶輸入
使用<kbd>表示通常通過鍵盤輸入的輸入。
       要切換目錄,請鍵入 
      cd後跟目錄的名稱。
      
要編輯設置,請按 ctrl + ,
 
     要編輯設置,請按 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>標籤。
 
      此文本應被視為計算機程序的示例輸出。 
     
 
     <samp>This text is meant to be treated as sample output from a computer program.</samp>