| Styling text with CSS is really simple. We | | | | 3. Make the text bold or Italic |
| can define colors, underline it, make it | | | | |
| bold, define the font etc etc. | | | | You can use the font-style property to create |
| | | | these effects. |
| We will start with some basics. | | | | |
| | | | Bold:p {font-weight:bold; |
| First we define the html where we will be | | | | |
| working with. | | | | } |
| | | | |
| This is the text | | | | Italicp {font-style:italic; |
| | | | |
| 1. Colorize your text | | | | } |
| | | | |
| We can select the P tag and add some styles | | | | 4. Overline, Underline, strike-through and |
| to it.p {color:red; | | | | none |
| | | | |
| } | | | | The text-decoration property is useful to |
| | | | create the underline and the other effects we |
| Now our text will turn red. You can define | | | | need.p |
| any color code your want or choose one of the | | | | {text-decoration:underline;text-decoration:li |
| 16 standard color names. The color names are: | | | | ne-through;text-decoration:overline;text-deco |
| aqua, black, blue, fuchsia, gray, green, | | | | ration:none; |
| lime, maroon, navy, olive, purple, red, | | | | |
| silver, teal, white and yellow. | | | | } |
| | | | |
| 2. Define the size of your textp | | | | On default, the text doesn't have any lines |
| {font-size:12px; | | | | at all. Except for the link. You can remove |
| | | | the underline by using the |
| } | | | | text-decoration:none; setting. |
| | | | |
| You can define any font-size you want, 145 | | | | You see, it's quite easy to style your text |
| pixels is not a problem. That is, technically | | | | using CSS. And you can do it all in a |
| speaking. | | | | separate stylesheet! |
| | | | |