Hey Friends, Today we are going to discuss CSS fonts. But before starting the article, I have to clear a thing that, font is part of both Html and CSS. In Html, we just placed our font and after it, we apply the property of the font using CSS. In a website, font played a very important role to look your website more beautiful and stylish. So let’s started our today’s topic CSS Fonts.
CSS Fonts
CSS Fonts property is used to control the texture of your website. By using this property you can change anything of your font just like text, font-family, bold, italic, color, and many more thing. We can see these properties one by one in the below examples. But before it lets me cover some important font attributes. These are listed below:-
- CSS Font Color
- CSS Font Family
- CSS Font Weight
- CSS Font Style
- CSS Font Size
CSS Font Color
This Font CSS Property is used to change the color of the text of your web pages. You can change the text color in three different ways. These different ways are:-
- By Color Name
- By Hexadecimal Value
- By RGB Value
In the above example, we define all 3 ways to change text color.
Example:-
Output:-
CSS Font Family
This font CSS property is used to change the font of your web pages. You can provide any type of value to it. Just like: - Arial, Times New Roman, Monospace, Arial Bold, etc.
Example:-
Output:-
CSS Font Weight
This Font Property is defined. how bold your text is. There are some different values by applying it you can change the font-weight accordingly to you. You can also use some predefined values such as Bold, Normal, Bolder, Light, etc.
Example:-
Output:-
CSS Font Style
This property defines that how your text will appear on your webpage. It may be normal, bold, italic, oblique, etc.
Example:-
Output:-
CSS Font Size
It define the size of the font appear on your webpages. It should be small, normal, medium, large.
Output :-
People Also Read :- CSS Padding Property
0 comments:
Post a Comment