Bootstrap Code


Display HTML element in page is tricky; you need to use <code> tag to display inline code and <pre> tag to display as code block. Bootstrap supports both tags. You need to use unicode variants for open and closing tag e.g. < and >.

  • If you want to display in line code use <code>.btn-group</code> tag.
  • If you want to display complete code block (multi lines) use <pre>.btn-group</pre> tag.

Syntax <code>

Usually &lt;code&gt;&lt;div&gt;&lt;/code&gt; tag is used for group creation.

The above code example will produce below output:

Usually <div> tag is used for group creation.

Syntax <pre>

<pre>
&lt;div class="btn-group"&gt;
  &lt;button type="button" class="btn btn-primary"&gt;Scripts&lt;/button&gt;
  &lt;button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"&gt;
    &lt;span class="caret"&gt;&lt;/span&gt;
  &lt;/button&gt;
  &lt;ul class="dropdown-menu" role="menu"&gt;
    &lt;li&gt;&lt;a href="#"&gt;Javascript&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#"&gt;AngularJS&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;
</pre>

The above code example will produce below output:

<div class="btn-group">
<button type="button" class="btn btn-primary"></button>
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Javascript</a></li>
<li><a href="#">AngularJS</a></li>
</ul>


See Also

AngularJS Built-in Filters
AngularJS Built-in Directives
AngularJS Expression
AngularJS Built-in Events
AngularJS Scope Methods
AngularJS Built-in Services
AngularJS Controller Inheritance
AngularJS Custom Directives



 
 
SHARE THIS IF YOU LIKE!
submit to reddit

SUBSCRIBE FOR LATEST UPDATES
HAVE WE CONNECTED ON FACEBOOK?
TOP TUTORIALSTOP CODE EXAMPLESTOP LIVE DEMOLINKSSTAY CONNECTED
HTML Tutorial
HTML5 Tutorial
Bootstrap3 Tutorial
Javascript Tutorial
TypeScript Tutorial
AngularJS Tutorial
CSharp Tutorial
PHP Tutorial
Developer Tools
Javascript
AngularJS
Google MAP API V3
ASP.NET
Javascript
AngularJS
Google MAP API V3
Contact Us
Advertise with Us
Privacy Policy
Disclaimer
Stay connected. We actually like you. If you want to get up to the minute updates, then connect with us on your fav below.
 
Twitter   Linkedin   Facebook   Google+    RSS   Pinterest
 
Protected by Copyscape Original Content Checker
 
 
Copyright ©2017 www.techstrikers.com Unauthorized reproduction/replication of any part of this site is prohibited.