Bootstrap - Code
Bootstrap allows you to display code with two different key ways −- The first is the <code> tag. If you are going to be displaying code inline, you should use the <code> tag.
- Second 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.
Make sure that when you use the <pre> and <code> tags, you use the unicode variants for the opening and closing tags − < and >.Let us see an example below −
<!DOCTYPE html>
<html>
<head>
<title>Try v1.2 Bootstrap Online</title>
<link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<script src="/scripts/jquery.min.js"></script>
<script src="/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<p><code><header></code> is wrapped as an inline element.</p>
<p>To display code as a standalone block element use <pre> tag as:</p>
<pre>
<article>
<h1>Article Heading</h1>
</article>
</pre>
</body>
</html>
<header>
is wrapped as an inline element.To display code as a standalone block element use <pre> tag as:
<article>
<h1>Article Heading</h1>
</article>
0 comments:
Post a Comment
Thanks