The font-family property in CSS lets you choose a suitable font for your website. It makes your text look attractive and visually appealing.
There are five types of Font Families that CSS supports.
<html> <head> <style> p { font-family: Courier New; } </style> </head> <body> <p> This is the first paragraph. </p> </body> </html>
So, in the above example, we have set the value of font-family property as Courier New.
<style> p { font-family: Courier New; } </style>
And if you look at the above output. The text This is the first paragraph changes accordingly.
We can also increase the size of the text in CSS using the font-size property.
<html> <head> <style> p { font-family: Courier New; font-size: 50px; } </style> </head> <body> <p> This is the first paragraph. </p> </body> </html>
So, in the above example, we have set the size of the text as 50px using the font-size property.
font-size: 50px;