Bootstrap pre tag styling

BootstrapWeb DevelopmentCSS Framework

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.

You can try to run the following code to implement the pre tag for code −

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <title>Bootstrap Example</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>
      <pre>
         <h1>Heading One</h1>
         <h2>Heading Two</h2>
      </pre>
   </body>
</html>
raja
Published on 18-Jun-2018 15:38:49
Advertisements