Examples of Style Properties for Text
Rule | Presentation |
---|---|
h2 {font-family:Arial; font-style:italic; color:blue} |
Heading 2 in blue Arial italicised text |
p {font-family:Arial; font-weight:bold; color:red} | A paragraph of bold Red text |
p {background:yellow; font-family:Arial; color:red} | A paragraph of Red text on a yellow background |
p {font-family:Arial; font-size:large; color:blue} | Large Blue Text |
em {background:red; color:white; font-style:italic} | Text with emphasised text |
Note: the value setting for the color property can be specified in hexadecimal form. For example, color:#000000 is equivalent to color:black.