Codechef4u is a community for computer professionals,by computer professionals,just like you; who loves sharing and helping each others,Join them
Share your post

Bootstrap code

Bootstrap code:

Bootstrap framework allows you to display code using two different tags:

1. Using 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.

2. Using code tag

 If you are going to be displaying code inline, you should use the <code> tag.

Example:

With below example I want to display C# LINQ source code using bootstrap source and pre tag

<p>with &lt;pre&gt; tag code as: 
        <pre> var UserDetails = (from userData in DbContext.User where userData.ManagerId == 3
                                select userData).ToList();         
        </pre>
        <p>using code tag.</p>
        <code>
      var UserDetails = (from userData in DbContext.User
                         where userData.ManagerId == 3
                         select userData).ToList();        
  </code>

Output is:


Invalid entry,please enter valid data.

Loading