Page 91 - Computer - 7
P. 91
Consider the code given below:
<style type = ‘‘text/css’’>
p {text-shadow: 2px 3px blue}
h1 {text-shadow: 4px 4px brown}
</style>
The above code specifies blue shadow for paragraph text and brown shadow for heading level 1 text.
Text-transform Property
The text-transform property is used to control the capitalisation of the text. You can choose from four
case values: capitalize, uppercase, lowercase, and none.
Consider the code given below:
<style type = ‘‘text/css’’>
p {text-transform: none}
h1 {text-transform: uppercase}
</style>
The above code specifies to the browser that the text of paragraph appears as it is and the text of
heading level one in uppercase.
Font Properties
The Font properties are used to specify the font, size and style for the text in a web page.
Property Description Value(s) Example
Specifies a list of fonts
font-family font name font-family: Arial
for the text
xx – small, x – small, small,
Specifies the size of a medium (default), large, x-large, font-size: large
font-size
font xx-large, larger, smaller, value, font-size: 20px
percentage
Specifies the style of normal (default), italic,
font-style font-style: italic
font oblique
Specifies all font font-style
font properties in one font-size font: bold 24px
declaration font-family Calibri
Consider the code given below:
<style type = ‘‘text/css’’>
p {font-size: small; font-family: Calibri}
h1 {font-family: Arial; font-style: italic}
</style>
The code specifies to the web browser that the text of paragraph is in Calibri font of small size and the
text of Heading level one is in Arial font and italicised.
89