Professional Documents
Culture Documents
ACFrOgAqNCoXN8CAHUNFVJoimfm8z592c1MTW0pfCDYQmMMTS7V KlAUadORPnYf7-NPhP9sBkuT 7BoVpMOybvQGcsvhTdyUCF
ACFrOgAqNCoXN8CAHUNFVJoimfm8z592c1MTW0pfCDYQmMMTS7V KlAUadORPnYf7-NPhP9sBkuT 7BoVpMOybvQGcsvhTdyUCF
ACFrOgAqNCoXN8CAHUNFVJoimfm8z592c1MTW0pfCDYQmMMTS7V KlAUadORPnYf7-NPhP9sBkuT 7BoVpMOybvQGcsvhTdyUCF
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.
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}
Theory Questions:
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.
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.