Textbook Answers VIII CS Using CSS in HTML
Textbook Answers VIII CS Using CSS in HTML
line of text
Ans: text-indent
c. A CSS rule contains a selector block and a ____________ block
Ans: declaration
d. CSS files are saved with an extension __________.
Ans: .css
e. _________ is an organisation which sets international standards for
the World Wide Web.
Ans: W3C
2. Text decoration
The text-decoration property is used for drawing lines over,
across or below the text.
Example:
<html>
<head><style>
h1{ text-decoration: overline; }
h2 { text-decoration: line-through; }
h3 { text-decoration: underline;}
</style></head><body>
<h1>This heading has a line above it</ h1>
<h2>This heading has a line across it</ h2>
<h3>This heading has been styled as underlined
</h3></body></html>
3. Text transformation
The text-transform property is used to specify the case of
letters in the text. It can be used to convert and display text in
uppercase, lowercase or title case that has the first letter of
each word capitalised.
<html><head><style>
p.uppercase { text-transform:
uppercase;}
p.lowercase { text-transform:
lowercase;}
p.capitalize { text-transform:
capitalize;}</style></head>
<body>
<p class=uppercase>Text styled in uppercase .</p>
<p class=lowercase>Text styled in lowercase.</p>
<p class=capitalize>Text styled in title case, where the first
letter of each word is capitalized.</
p>
</body></html>
font-size: 18px; }
</style></head><body>
<p id=pid1>This is an example of id selector</p>
<p>This text is not affected by the style.</p>
</body></html>
d. What is CSS? Which are the different ways in which a style sheet
</style></head><body> … </body>
e. Shreya has created a website with more than ten web pages. She
needs to use CSS for formatting the web pages. Which type of
Ans: <head><style>
h1{text-decoration: underline; text-align: center}
p.main{text-align:center}
</style>
</head>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>