ACFrOgAqNCoXN8CAHUNFVJoimfm8z592c1MTW0pfCDYQmMMTS7V KlAUadORPnYf7-NPhP9sBkuT 7BoVpMOybvQGcsvhTdyUCF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Revision Assignment

Subject: Computer Science


Class: VII
Topic: Introduction to CSS
A. Fill in the blanks using the words given in the box.

font-style, <style>, border-style, font-size, selector

a. We define CSS rules using the​ <style> ​element in the embedded Stylesheet.

b. The​ font-style ​property can be used to specify the style as italics or oblique for the
text.

c. The values small, large and larger can be given to the​ font-size ​property in CSS.

d. An HTML element to which a style rule is applied is called​ selector ​in CSS.

e. To display a dotted border surrounding the element, the​ border-style ​property can
be used.

B. Choose the correct answer:


a. Which property can be used to change the capitalization of the text in CSS?
i. text-decoration
ii. ​text-transform
iii. font-weight
iv. Font-style

b. Which of the following is the correct method(s) to specify colors in CSS?


i. color: red
ii. color: #ff0000
iii. color: rgb(255,0,0)
iv. ​All of these

c. Find the odd one out:


i. font-size
ii. ​font-type
iii. font-family
iv. Font-weight

d. Which of the following code will you use to display the following output in
the browser window?
i.​ <h1 style="text-decoration:overline"> Keep Smiling </h1>
ii. <h1 style="text-transform:overline"> Keep Smiling </h1>
iii. <h1 style="text-border:overline"> Keep Smiling </h1>
iv. <h1 style="text-style:overline"> Keep Smiling </h1>

C. Point out the errors in the following code and rewrite the correct code:
a.
<head>
<style>
P[background-color=blue; font type=Arial]
</style>
</head>
<head>
<style type=text>
p{background-color:blue; font-family:arial}
</style>
</head>

b.
<p style=”font-size:40; border-type:dashed”>Amplify Hope</p>
<p style=”font-size:40px; border-style:dashed”>Amplify Hope</p>

c.
<h1 style=”text-transform: line-through; text decoration:capitalize”> Aim High </h1>
<h1 style=”text-decoration: line-through; text-transform:capitalize”> Aim High </h1>

D. Write one line of CSS code statement to attach the following style rules to the given
Selectors:

a) Level 1 Heading to be displayed in size 20px, font Jokerman, and overline. (Use
inline style rule)
<h1 style=”font-size:20px; font-family:jokerman; text-decoration:overline>
b) Paragraph element to be displayed with background-color as indigo and border
with thickness 7px and style dashed. (Use embedded style sheet)
p{background-color:indigo; border-width:7px; border-style:dashed}

c) Level H2 Heading to be displayed in italics in capitals. (Use embedded style sheet)


​ H2{font-style:italic; text-transform:uppercase}

Theory Questions:

1. Differentiate between Inline stylesheet, Embedded stylesheet and External


stylesheet.

Inline style sheet Embedded Style Sheet External Style Sheet

Inline style sheets are used Internal style sheet is used External style sheets are
to define unique styles for a to define unique styles for used when there are several
particular HTML tag. the elements of a single HTML documents that share
HTML document. similar formatting.

It is defined using the style It is defined using the It is defined by creating a


attribute of the HTML tag <STYLE> tag that is separate style sheet with the
written inside the extension .css and linking it
<HEAD> tags of the to one or more HTML
HTML document. documents.

2. Define CSS. How is it superior to HTML?


CSS stands for Cascading style Sheets. It is a design language that can be used to describe
how HTML elements are to be displayed.
Using CSS, we can control the way various elements on a web page should appear,
including colour, fonts, background colour, borders, etc.

CSS offers more style rules than HTML to control the appearance of the elements in an
HTML page.
The design specifications in a CSS file can be applied to multiple pages. This not only saves
time but also provides for easy maintenance as changes in CSS file updates the elements in
all the web pages.

You might also like