How To Style Your Text With CSS

The first step of using the CSS is to define the html where we will be working with the styling. To colorize the text a tag is selected to change the color according to the choice which has to be mentioned in the code.
TEXT{
color:red;
}
With the above mentioned code the text turns red, in the same way any other colour can be mentioned amongst the standard sixteen colour names.
In the same way the text can also be resized according to the choice by using another tag line with the text as below:
TEXT {
font-size:15px;
}
Any font size can be achieved using the styling method, which involves the sizes in pixels, in this case 15 pixels are used.
The text can be used to add the bold and the italic effect by using the effect's name itself for example to make the text Bold the following command I used:
Bold:
TEXT {
font-weight:bold;
}
Similarly for adding the italics effect the same command is used with the Italics heading as shown below:
Italic
TEXT {
font-style:italic;
}
The other common font features such as the Underlining, overlining, and even strike through can all be achieved using these commands, an example of the underlining is:
TEXT {
text-decoration:underline;
}
The underline can then be removed by using the command of the text-decoration:none; setting.
It is quite simple and easy to use the CSS for the styling of the text.
0 comments:
Post a Comment