Page 68 - Code & Click - 7
P. 68
2. Open the HTML document in Microsoft Edge.
SETTING TEXT PROPERTIES
Text properties provide various formatting options to let you style text in a web page. The various
text properties are described in the table given below.
Property Description Value(s) Example
colour name, color: blue
Specifies the foreground
color hexadecimal colour value, color: #ff3535
colour of the text
RGB colour value color: rgb(40, 550, 135)
Specifies the horizontal
text-align left, center, right, justify text-align: center
alignment of text
normal (default),
number (multiplied with the
current font size to set the
line height),
Specifies the distance line-height: normal
line-height length (fixed line spacing in
between two lines line-height: 6px
px, pt or cm),
percentage value (line
height in percentage of
current value)
text-decoration:
none (default), underline,
Specifies the type of line underline
text-decoration overline,
that is added to the text text-decoration:
linethrough
overline
Specifies the shadow text-shadow: 3px 3px
text-shadow x-position y-position colour
effects for the text blue
none (default), capitalize
Controls the (first character of each word text-transform:
text-transform
capitalisation of the text in uppercase), uppercase, uppercase
lowercase
Let us learn about some of these properties in detail.
66