Coming Soon
Subscription Marketplace - Buy and sell subscription products and services
451 views
in Articles by
Styling text with CSS is really simple. We can define colors, underline it, make it bold, define the font etc etc.

We will start with some basics.

First we define the html where we will be working with.
<p> This is the text </p>

1. Colorize your text

We can select the P tag and add some styles to it.
p {
  color:red;
}

Now our text will turn red. You can define any color code your want or choose one of the 16 standard color names. The color names are: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white and yellow.

2. Define the size of your text
p {
  font-size:12px;
}

You can define any font-size you want, 145 pixels is not a problem. That is, technically speaking.

3. Make the text bold or Italic
You can use the font-style property to create these effects.

Bold:
p {
  font-weight:bold;
}

Italic
p {
  font-style:italic;
}

4. Overline, Underline, strike-through and none

The text-decoration property is useful to create the underline and the other effects we need.
p {
  text-decoration:underline;
  text-decoration:line-through;
  text-decoration:overline;
  text-decoration:none;
}

On default, the text doesn’t have any lines at all. Except for the link. You can remove the underline by using the text-decoration:none; setting.

You see, it’s quite easy to style your text using CSS. And you can do it all in a separate stylesheet!

Please log in or register to reply to this topic.

Related topics

0 replies 595 views
posted in Articles by Camella
0 replies 555 views
posted in Articles by Madept
0 replies 751 views
posted in Articles by Amigod
0 replies 546 views
posted in Articles by Prepatriarch
0 replies 667 views
posted in Articles by Knighthawk
0 replies 656 views
posted in Articles by SilkPredator
0 replies 625 views
0 replies 653 views
0 replies 619 views
0 replies 554 views
posted in Articles by HuggingDuck
0 replies 589 views
0 replies 492 views
posted in Articles by AfternoonFay
0 replies 632 views
0 replies 657 views
posted in Articles by HarshThunder
0 replies 701 views
posted in Articles by Scorpeon
0 replies 660 views
posted in Articles by Knighttime
0 replies 722 views
0 replies 614 views
0 replies 625 views
posted in Articles by LovableStorm
0 replies 596 views
0 replies 601 views
posted in Articles by Amigod
0 replies 597 views
posted in Articles by Cybora
0 replies 550 views
posted in Articles by Explorer
0 replies 552 views
0 replies 542 views
0 replies 613 views
posted in Articles by Hawkward
0 replies 530 views
posted in Articles by FlamboyantChomper
0 replies 502 views
posted in Articles by PlushSeal
0 replies 558 views
posted in Articles by CheeryGrin

0 topics

0 replies

0 comments

2,499,598 users

Connect with us:
...