Forum Discussion
Fonts
How do I change fonts in the add code block?
7 Replies
- MadelayneCommunity Member
Hi Sarah,
You would need to add it in with css, for example like explained here CSS Google Fonts
or if using the zip file option, you can add the fonts into there and reference them in your css. - SarahWilkins968Community Member
Thank you. I'm not doing the zip option, just adding the code straight in. The problem is it's not a google font, is there any other way for a non google font?
- KristaMCommunity Member
Is there any way to have the block inherit the course's theme font, particularly if that font is a custom upload?
- ErinVincent-a24Community Member
I'm also looking to do this! Have you figured it out?
- EricaHunterCommunity Member
You can call webfonts in CSS without an issue. We use Open Sans and use Verdana for activities:
body {
font-family: Verdana, sans-serif;
font-size: 1.1rem;
margin: 0;
padding: 1rem;
background-color: white;
color: #333;
}I asked Copilot what the best webfont for Open Sans. I think it looks pretty decent:
- TeresaIden-9681Community Member
SarahWilkins968 You can also just in-line style the html when all you have is the code. It's using CSS properties and values, but inside the html. You can get some really good information about this at HTML Styles (W3Schools).
- PhilFossCommunity Member
I made a screen recording showing my recommended method for adding Google fonts to a Code Block-
Related Content
- 9 years ago
- 11 months ago
- 8 months ago