Bootstrap 3 Essential Training, Styling code

Bootstrap comes with a few styles that can help you format code. Now, most of these are going to be style implementations of existing HTML tags. Let’s say that we wanted to show this EM word right here as code. I’m going to cut that out and add the code tag and I’ll paste that in there.

And you can see that it shows up as red text with a pink background. It really makes it stand out from the rest of the page. Now, just remember that if you do want to use HTML code in here, you’re going to have to escape the angle brackets.  

So, you would have to do & < ; and then & > ; here. And if we save it, you can see that it looks like HTML text. To highlight control key combinations, we can use the keyboard tag.

So, go ahead and modify these and they’re going to use the keyboard tag. So, I’ll take that control C and paste it in here and you can see that it looks like text inside a box with rounded edges and white text, which I think looks really nice and makes it stand out.  

Let’s go ahead and do the same thing for the queue here.  

Leave a Reply

Notify of