Cascading Style Sheet have more font related properties
The above CSS is applied in inline css, the below example is indicate internal CSS
Example:-
Example Program:- (Editor)
Output:-
Advertisement
Screen Shots:-
CSS Font Size:
CSS "font-size" is used to assign the text size for html elements
Example:-
<div style="font-size:20px">
This div text font size is 20px
</div>
CSS Font Family:
CSS "Font-Family" is used to assign the font for the HTML elements
<p style="font-family:cursive">
This div applied cursive font
</p>
This div applied cursive font
</p>
CSS Font Color:
CSS "Font-color" is used to apply font color for the HTML elements.
<div style="color:red">
This Text should be appear in RED color
</div>
This Text should be appear in RED color
</div>
The above CSS is applied in inline css, the below example is indicate internal CSS
Example:-
<style>
.c1{
color:red;
font-size:15px;
font-family:fantasy;
}
</style>
<div class="c1">
This is the text
</div>
.c1{
color:red;
font-size:15px;
font-family:fantasy;
}
</style>
<div class="c1">
This is the text
</div>
Example Program:- (Editor)
Output:-
Advertisement
Screen Shots:-
0 comments:
Post a Comment