How to Change the Bootstrap Font Family for All Headlines. Add a google font stylesheet below the Bootstrap CSS stylesheet. Add this to your theme stylesheet to override Bootstrap's default values.
Bootstrap 4 uses a default font-size of 16px, and its line-height is 1.5. The default font-family is "Helvetica Neue", Helvetica, Arial, sans-serif. In addition, all <p> elements have margin-top: 0 and margin-bottom: 1rem (16px by default).
To change font type purely with HTML, use the CSS font-family property. Set it to the value you want and place it inside a style attribute. Then add this style attribute to an HTML element, like a paragraph, heading, button, or span tag.
Bootstrap 5 Default Settings Bootstrap 5 uses a default font-size of 1rem (16px by default), and its line-height is 1.5.
Bootstrap docs say:
Use the
@font-family-base
,@font-size-base
, and@line-height-base
attributes as our typographic base.
Does this mean there is a CSS variable called @font-family-base
?
How can I set this in CSS to change the font for my whole page?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With