+ 2
How to change the font
11 Respostas
+ 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.
+ 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.
+ 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?
+ 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;
}
+ 1
It did not work.
+ 1
ISAAC BARINEKA DEEKOR which type of code editor are you using?
+ 1
Webcode
+ 1
ISAAC BARINEKA DEEKOR please install visual Studio
+ 1
Ok
0
Doesn't work
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