Page 149 - Computer Genius Class 07
P. 149
Text Properties
Text properties are used to change the appearance of the text. The text properties and their values
used with the style attribute are given below:
Property Value Description
color Name of the colour Specifies the te t colour to e used on the e page
text-align left, right, center, justify Specifies the alignment o the te t
text-indent length in pixels or percentage Specifies the indentation o the first line o the te t
underline, overline or Specifies the te t effects li e underline o erline or
text-decoration
strikethrough strike-through
capitalize, uppercase, Specifies the trans ormation o te t into uppercase
text-transform
lowercase and none lowercase or title case
Create an HTML5 web page by using the text properties.
<!DOCTYPE html>
<HTML>
<HEAD> <TITLE>Text Properties</TITLE>
<STYLE>
H1{font-family:Comic Sans MS; text-align:center;
text-decoration:underline;color:red}
</STYLE>
</HEAD>
<BODY>
<H1>Earth</H1>
<P style=”font-family:Times New Roman; text-transform:uppercase”> Earth is
the third planet from the Sun. It is the only planet that is known to sustain
life form. About 70% of the Earth’s surface ic covered with water, rest of the
earth surface is home to all the land dwelling animals.</P>
<hr Size=”10” width=”80%” color=”grey”>
<P style=”font-family:Times New Roman; text-transform:lowercase”>
Life on earth is sustained majorly due to the atmosphere. It consists of 4
layers, namely troposphere, stratosphere, mesosphere and thermosphere.</P>
</BODY>
</HTML>
HTML5 & CSS3 147

