Thursday, July 17, 2014

Bootstrap Code

Bootstrap Code allows you to show html css and other language codes with three different key ways:





  • The first option is the <code> tag. If you are going to be displaying code inline, you should use the <code> tag.


    Let us see an example below:


    <p><code>&lt;section&gt;</code> is wrapped as an inline element.</p>


  • Second option is the <pre> tag. If the code needs to be displayed as a standalone block element or if it has multiple lines, then you should use the <pre> tag.

  • Let us see an example below:




<p>To display code as a standalone block element use &lt;pre&gt; tag as:
<pre>
&lt;article&gt;
&lt;h1&gt;Article Heading&lt;/h1&gt;
&lt;/article&gt;
</pre>

  • Third option is user <kbd> input Use the <kbd> to indicate input that is typically entered via keyboard.

  • Let us see an example below:


    To switch directories, type <kbd>cd</kbd> followed by the name of the directory.

    Ensure that when you use both the <pre> and <code> tags, you use the unicode variants for the opening and closing tags: &lt; and &gt;.




    Bootstrap Code

    No comments:

    Post a Comment