I am creating a blog site and I want to change the Bootstrap font. In my import CSS in header I added this font
<link href='http://fonts.googleapis.com/css?family=Oswald:400,300,700' rel='stylesheet' type='text/css'>
How can I use this as my bootstrap default font?
Google Fonts To start, right click the Fonts group in the Design panel and choose the Manage Fonts option. This will bring up the Google Fonts browser. Here you can search for font families, filter by category and supported language, and activate the styles that you need.
Bootstrap 4 Default Settings The default font-family is "Helvetica Neue", Helvetica, Arial, sans-serif.
Bootstrap 5 Default Settings Bootstrap 5 uses a default font-size of 1rem (16px by default), and its line-height is 1.5. In addition, all <p> elements have margin-top: 0 and margin-bottom: 1rem (16px by default).
To add google fonts, search for the google fonts, select the font category and family, then select the font style of your choice. Once you select the font, “copy the font link”, from the “selected families windows” and paste it in the head section of the HTML file.
First of all, you can't import fonts to CSS that way.
You can add this code in HTML head:
<link href='http://fonts.googleapis.com/css?family=Oswald:400,300,700' rel='stylesheet' type='text/css'>
or to import it in CSS file like this:
@import url("http://fonts.googleapis.com/css?family=Oswald:400,300,700");
Then, in your css, you can edit the body's font-family:
body { font-family: 'Oswald', sans-serif !important; }
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