Font Styling
CSS also has font property used to add or change fonts on your website. The font property is given below:
body {
font-family: sans-serif;
}
If you want to change the font of your entire website then add the font property in your body selector. We can choose fonts from fonts.google.com, select the style, copy the font link, paste it under the header section, copy the CSS code, and paste it into your selector.
For Example:
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<link href="<https://fonts.googleapis.com/css2?family=Montserrat:wght@800;900&family=Ubuntu&display=swap>" rel="stylesheet">
<title>Document</title>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>
CSS:
body {
font-family: 'Montserrat', sans-serif;
}
Check it by yourself.
Good job...👍👍
ReplyDelete