A user should use <code> tag for displaying the code inline and likely so the user needs to display the code as standalone block elements and for that the user needs to use <pre> tag. This way we can work with codes and scripts in bootstrap. A detailed example is given below :
Example:
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8"/>
<title>nirajanghimirey's workshop</title>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>
</head>
<body>
<p>
<pre>
<article>
<h1>This is an example of Joe's code</h1>
<h2>This is how a code is written</h2>
</article>
</pre>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
</body>
</html>
No comments:
Post a Comment