CSS (Cascading Style Sheets)

Formatting Text

Making the text different can get very involved. But let's start off a little simple:

  1. h1 {color: #ff0000}
  2. h2 {color: #ffddff}
  3. p {color: #aaccee}

Numbers 1 and 2 are just different headings and number 3 is a paragraph. An example of that is on this page: Click here. You can continue with the different headings, since there are usually 6 different heading styles to change.

Other ways to change your text could be with different "decorations."

  1. h1 {text-decoration: overline}
  2. h2 {text-decoration: line-through}
  3. p {text-decoration: underline}

Number 4 changes the first heading style to make it with a line above it. Number 5 changes the second heading style to put a line through it. Number 6 changes the paragraphs to be entirely underlined. To see an example of that, click here.

Ready for some real fun? You can put the two codes together. Cool! Here's what that would look like, and following that is a link to the example page:

  1. h1 {color: #ff0000; text-decoration: overline}
  2. h2 {color: #ffddff; text-decoration: line-through}
  3. p {color: #aaccee; text-decoration: underline}

Click for example.