myCBSEguide
Class 10 - Computer Applications (165)
CSS 02
1. The CSS property used to set the maximum width of the element's content box is:
a) max-width property
b) position property
c) height property
d) max-height property
2. The attribute used to set the border color of a table is:
a) border-color
b) border color
c) color
d) border
3. What is the correct syntax to change the font name?
a) Font-type:
b) Font-family:
c) Font:
d) Font-name:
4. Which of the following CSS function allows us to perform calculations?
a) calculate() function
b) cal() function
c) calculator() function
d) calc() function
5. Which of the following is the correct syntax to make the background-color of all paragraph elements to yellow?
a) all {background-color: yellow;}
b) all p {background-color: #yellow;}
c) p {background-color: yellow;}
d) p {background-color: #yellow;}
6. Define dynamic web page.
7. Differentiate between <Textarea>tag and textbox field.
8. What do you mean by font-variant? Give example of each.
9. Name the different types of style sheets.
10. Briefly explain the precedence order of style sheets.
11. Form a CSS code within the <HEAD> .... </HEAD> for the following specifications:
i. Background colour: blue.
ii. For the paragraph, font family is Dotum and colour of the text is red.
iii. Heading should be in black colour.
To practice more questions & prepare well for exams, download myCBSEguide App. It provides complete study
material for CBSE, NCERT, JEE (main), NEET-UG and NDA exams. Teachers can use Examin8 App to create similar
papers with their own name and logo.
12. Discuss different border properties.
13. What is the use of external style sheet. Explain its advantages and disadvantages.
14. Answer the following questions:
i. What do you understand by FONT property?
ii. What do you understand by FLOAT property?
Copyright © [Link]. Mass distribution in any mode is strictly prohibited.
1/5
myCBSEguide
iii. What is the use of ALIGN property in CSS?
15. Write the HTML code to design a Web page as Shown below:
Roll No. Name Marks Class Average
1 Amit 95
2 Angel 96 95.5
Teacher Mr. Hamid
Consider the specifications as given below.
Students can write the code for any 4 specifications out of the given 5 specifications.
Specification-1: Use CSS to set the following for the entire body:
Text colour of the entire page as Tomato
Background color of the entire page as; Light blue.
Font-family as Helvetica.
Specification-2: The value of the table border attribute should be 1. Table header tag should be used wherever required.
Specification-3: The table should exactly contain 4 rows and 4 columns. The data in each cell should be as shown in the
above table.
Specification-4: Attribute rowspan should be used wherever required.
Specification-5: Attribute colspan should be used wherever required.
16. Read the text carefully and answer the questions:
Comparing HTML and CSS: HTML and CSS are not really different from each other, rather CSS is an extension of
HTML. CSS enhances basic HTML tags and attributes and improves the presentation of web pages. HTML pages
contain HTML tags and different styles can be specified for these tags using CSS. A single CSS file can be linked to
many web pages. All web pages will import the styles of the style sheet. Thus, we can say that HTML contains basic tags
to create web pages, whereas CSS is an extension of HTML, as it specifies the formatting and appearance styles for these
web pages.
i. How CSS saves time to develop web pages?
ii. How CSS is easy to maintain?
iii. How CSS is compatible on multiple devices?
iv. How CSS efficiently works with search engines?
v. What do you mean by SEO?
vi. Write any one disadvantage of using CSS.
vii. Define Font size property in CSS.
Copyright © [Link]. Mass distribution in any mode is strictly prohibited.
2/5
myCBSEguide
Class 10 - Computer Applications (165)
CSS 02
Solution
1. (a) max-width property
Explanation: max-width property
2. (a) border-color
Explanation: border-color
3. (b) Font-family:
Explanation: Font-family:
4. (d) calc() function
Explanation: calc() function
5. (c) p {background-color: yellow;}
Explanation: p {background-color: yellow;}
6. The dynamic web page contains information that changes each time it is viewed. These web pages are interactive. E-
commerce sites, news channel or newspaper sites are examples of dynamic websites.
7. <Textarea> textbox
It is a control tag that allows the user to input text The textbox or text field is a single line text input field. It is
over multiple rows. A text area can hold an unlimited useful when one needs to get the user input data such as first
number of characters. name, middle name etc.
The size of a text area is specified by the, 'cols' and You can create this by giving the text field attribute in <input>
'rows' attributes. tag.
8. The Font-variant property is used to select normal or small-caps variants of a font.
9. The different types of style sheets are: Inline style sheet, Internal style sheet and External style sheet.
10. The precedence order of style sheets are as follows:
i. Internal Style Sheet: The internal style sheet has the highest priority. So, it will override any rule defined in
the <STYLE> ... </STYLE> tags or the rules defined in any external style sheet file.
ii. Inline Style Sheet: After the internal style sheet, the second priority is given to the inline style sheet. Any rule
defined in the <STYLE> ... </STYLE> tags will override rules defined in any external style sheet file.
iii. External Style Sheet: The external style sheet has the least priority. Any rule defined in an external style sheet file
takes the lowest priority, and rules defined in this file will be applied only when the above two rules are not
applicable.
11. <HEAD>
<STYLE>
BODY {background-color: blue;}
P{color:red; font-family:Dotum;
}
H1{color:black;}
</STYLE>
</HEAD>
Copyright © [Link]. Mass distribution in any mode is strictly prohibited.
3/5
myCBSEguide
12. The border properties are used to specify the border-style, border-color, border-width, etc. Different border-style
properties are as follows:
i. Border-color: This property specifies the colour of a border.
ii. Border-style: This property specifies whether a border should be solid, dashed line, double line or one of the other
possible values.
iii. Border-width: This property specifies the width of a border.
To practice more questions & prepare well for exams, download myCBSEguide App. It provides complete study
material for CBSE, NCERT, JEE (main), NEET-UG and NDA exams. Teachers can use Examin8 App to create similar
papers with their own name and logo.
13. With an external style sheet, you can change the look of the entire website by changing just one file. Each page must
include a reference to the external style sheet, file inside the <LINK> element.
The <LINK> element goes inside the <HEAD> section. An external style sheet can be written in any text editor. The
style sheet file must be saved with a .css extension.
Advantages
With the help of external style sheets, the styles of numerous documents can be organised from one single file.
In external style sheets, classes can be made for use on numerous HTML element types in many forms of the site.
In complex contexts, methods like selector and grouping can be implemented to apply styles.
Disadvantages
An extra download is essential to import style information for each file.
The execution of the file may be delayed till the external style sheet is loaded.
While implementing style sheets, we need to test Web pages with multiple browsers in order to check
compatibility issues.
14. i. The font properties are mainly used to format the text appearing in web pages as these properties specify the font
type, size and colour for an HTML tag. The different font properties that can be specified for an element are as
follows:
The font-family property specifies the face of a font. It can accept any font family name as value.
The font-style property makes a font italic or oblique. The style can be specified in terms of normal, italic and
oblique.
The font-size property either increases or decreases the size of a font. The size can be specified in terms of xx-small,
x-small, small, medium, large, x-large, xx-large, smaller and larger in pixels or in %.
ii. The float property specifies the position or alignment of the content around each other when these are put inside
another container. For example, how the text should be placed around an image when the image is put up inside a
box. The float property can have one of the following values:
a. Left: The element floats to the left of its container.
b. Right: The element floats to the right of its container.
c. None: The element does not float (will be displayed just where it occurs in the text). This is default.
d. Inherit: The element inherits the float value of its parent.
iii. The Align property is used to specify the alignment position, i.e., left, right and center of an HTML tag. It can be
used to specify the alignment of text, images, etc.
15. <html>
<head>
<style>
Body
{
color: tomato;
background-color: lightblue;
Copyright © [Link]. Mass distribution in any mode is strictly prohibited.
4/5
myCBSEguide
font-family: helvetica;
}
</style>
</head>
<body>
<table border =1>
<tr>
<th>Roll No.</th>
<th>Name</th>
<th>Marks</th>
<th>Class Average</th>
</tr>
<tr>
<td>1 </td>
<td>Amit </td>
<td>95 </td>
<td rowspan=3>95.5</td>
</tr>
<tr>
<td>2 </td>
<td>Angel </td>
<td>96 </td>
</tr>
<tr>
<td colspan=3>
Teacher:[Link] </td>
</tr>
</table>
</body>
</Html>
16. i. CSS allows us to specify the formatting styles for different HTML tags only once. These styles will be applied
to all the tags of a single web page or same style sheets can even be linked to several web pages.
ii. In case if we wish to change the formatting styles, we only need to specify the changes in CSS files and these
will be reflected in all the specified web pages. Thus, CSS is easy to maintain.
iii. Using style sheets, HTML content can be formatted to load on more than one type of device.
iv. Pages developed using CSS are efficiently searched by search engines as there is lesser code in these pages.
Thus, CSS makes web pages/websites SEO friendly.
v. SEO stands for Search Engine Optimisation. It is basically the practice of increasing the number and quality of
visitors to a website by improving rankings in the algorithmic search engine results.
vi. CSS syntax and styles are different from HTML. So, even if we have learnt all the HTML tags in detail, we still
need to learn CSS coding in case we wish to use CSS with HTML.
vii. The font-size property in CSS is used to specify the height and size of the font. It affects the size of the text of
an element. Its default value is medium and can be applied to every element.
Copyright © [Link]. Mass distribution in any mode is strictly prohibited.
5/5