+ 2

How to change the font

2nd Jun 2024, 3:24 PM
ISAAC BARINEKA DEEKOR
ISAAC BARINEKA DEEKOR - avatar
11 Answers
+ 8
You need to use the CSS font-family property and can be done inside HTML like this: <p style="font-family: Arial"> However, it's considered best practice to link a separate CSS style sheet.
2nd Jun 2024, 3:52 PM
Keith
Keith - avatar
+ 6
ISAAC BARINEKA DEEKOR There are only a few standard web safe fonts available to your browser unless you import custom fonts. If it didn't work for you, it may be because you were trying to use a font that has not been imported. Try using Google fonts: https://www.w3schools.com/css/css_font_google.asp#:~:text=How%20To%20Use%20Google%20Fonts,the%20font%20in%20the%20CSS.
2nd Jun 2024, 5:04 PM
Keith
Keith - avatar
+ 3
I tested and it worked. Share your code so we can see. Also, are you talking about what font your text wants to look like. Or are you talking about the size of your font?
2nd Jun 2024, 4:43 PM
Junior
Junior - avatar
+ 3
To change the font for your entire website, add this to your CSS file (`styles.css`): body { font-family: Arial, sans-serif; } you can Use Google Fonts Step 1: Choose a Font Go to [Google Fonts](https://fonts.google.com/), select a font you like, and click "Select this style". Step 2: Add the Font to Your HTML Copy the provided `<link>` tag and paste it in the `<head>` section of your HTML file (`index.html`): <head> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap"> <link rel="stylesheet" href="styles.css"> </head> ``` Add the font to your CSS file (`styles.css`): body { font-family: 'Roboto', sans-serif; }
4th Jun 2024, 12:35 AM
EliteAI
EliteAI - avatar
+ 1
It did not work.
2nd Jun 2024, 4:32 PM
ISAAC BARINEKA DEEKOR
ISAAC BARINEKA DEEKOR - avatar
+ 1
ISAAC BARINEKA DEEKOR which type of code editor are you using?
3rd Jun 2024, 11:41 AM
Vidhya Tharan
Vidhya Tharan - avatar
+ 1
Webcode
6th Jun 2024, 5:43 PM
ISAAC BARINEKA DEEKOR
ISAAC BARINEKA DEEKOR - avatar
+ 1
ISAAC BARINEKA DEEKOR please install visual Studio
9th Jun 2024, 4:14 AM
Vidhya Tharan
Vidhya Tharan - avatar
+ 1
Ok
17th Jun 2024, 5:37 PM
ISAAC BARINEKA DEEKOR
ISAAC BARINEKA DEEKOR - avatar
0
Doesn't work
22nd Jun 2024, 1:00 PM
ISAAC BARINEKA DEEKOR
ISAAC BARINEKA DEEKOR - avatar
0
Use div tag for the whole h1 to h6 element tgen close the div tag, style your div with whatever font family you want to use
30th Jun 2024, 1:59 PM
Ridwan Akorede
Ridwan Akorede - avatar