Search code examples
htmlcsstwitter-bootstrapbootstrap-4typography

Does twitter bootstrap have any font-size utility classes?


I can't find any utility classes for changing the font size in Bootstrap. There are utility classes for margins and padding, etc. There are display classes for headings and there's a lead class for paragraphs, but is there any way to make a specific piece of text larger and smaller with a utility class in html instead of having to add some css?

I find it's easier to mock up designs quickly using as many utility classes as possible before abstracting common patterns into custom css.

I've combed through the Bootstrap Text Utilities docs and the Typography docs, but can't find anything. Am I missing something or does this just not exist in Bootstrap? This seems like something Bootstrap would offer offer—the ability to change the text size by adding a class name like t-1, t-2, t-3, t-4, etc.

I'm not talking about responsive typography, just changing the default font size with a utility class instead of writing css.


Solution

  • There is no classes to change the font size but you can manage font size with strong and small tag but you cant change paragraph font size. You need to create custom CSS to do that.