CSS Revision Questions
CSS Revision Questions
COMPUTER APPLICATIONS
CLASS 10
3. Write the equivalent CSS code to set the following styles for a web page:
i. Entire page background color should be yellow
ii. Second level Heading properties should be as follows: Text color should be Red
Left margin should be 25 px
ANS:1. body { background-color: yellow; } 2. h2 { color: red; /* Text color
should be Red */ margin-left: 25px; /* Left margin should be 25 px */ }
4. Write HTML code to design the content of the web page in the form of lists as shown
below:
III. Read the text carefully and answer the questions: 2x5=10
1. Read the text carefully and answer the questions:
Consider the following code and answer the given questions
<head>
<title>Example CSS</title>
<style type = "text/css">
H1 {
color:red;
font-size:20px;
text-decoration:underline;
}
P{
font-weight:bold;
font-style:italic:
}
</style>
</head>
<body>
<h1>Dynamic Hyper Text Markup Language</h1>
<p>Hyper Text Markup Language</p>
<p>World Wide Web</p>
<p>Cascading Style Sheets</p>
</body>
</html>
1.What type of style sheet is used in this code?
a) Inline b) External c) Internal d) Subline
2. Internal styles are applied on:
a) The heading b) The entire webpage
c) The paragraph d) To all tags of same type in a webpage
3.Which of the following style is used to make the text bold?
a) Font-style b) Font-weight c) Font-variant d) Font-size
4. How will the text appear in given code?
<p>World Wide Web</p>
a) Bold b) Italic and size 20 c) Italic and red colour d) Bold and italic