Chapter 5 Dhtml & Css-x
Chapter 5 Dhtml & Css-x
Chapter–5
DHTML & CSS
Exercise:
A. Multiple Choice Questions:
1. Which property describes how bold or “heavy” a font should be presented?
(a) Font style
(b) Font size
(c) Font weight
(d) Font variant
Ans:(c) Font weight
2. The units „___‟ and „___‟ allow the user to adjust the font size according to him/her.
(a) „#‟ and „me‟
(b) „%‟ and „em‟
(c) „$‟ and „es‟
(d) All of the above
Ans:(b) „%‟ and „em‟
5._________ is a style sheet language used for describing the look and formatting of a
document written in a markup language.
(a) Document Object Model (DOM)
(b) Multimedia filters
(c) Cascading Style Sheets (CSS)
(d) DHTML
Ans:(c) Cascading Style Sheets (CSS)
1
6. Which property is used to give the specified spacing between the text characters?
(a) Text Decoration
(b) Letter Spacing
(c) Text Transform
(d) None of the above
Ans:(b) Letter Spacing
7. The units „px‟ and „___‟ make the font size absolute.
(a) „pr‟
(b) „pn‟
(c) „pz‟
(d) „pt‟
Ans:(d) „pt‟
8. The _______ repeats the image both horizontally and vertically to cover the entire screen.
(a) Background Image property
(b) Foreground Color property
(c) Background Color property
(d) Background Repeat property
Ans:(d) Background Repeat property
2
2. List some advantages and disadvantages of CSS.
Answer:
Advantages of CSS are:
1. It controls layout of many documents from one single style sheet.
2. It has more precise control of layout.
3. It applies different layouts to different media-types.
4. It has numerous advanced and sophisticated techniques to be applied on web pages.
Disadvantage of CSS are:
CSS is very limited in browser compatibility. When you design a web page and you
want it to display exactly as you like it. The problem with CSS is that it displays
WebPages very differently in the different browsers.
3. What is the extension of a CSS file?
Answer: The extension of CSS file is .CSS
10. How the text in a webpage can be capitalized using CSS properties?
Answer: The text-transform property controls the capitalization of a text. We can choose to
capitalize effects to be applied on text in the HTML code.
Example: p {letter-transform: uppercase ;}
11. Explain the CSS properties to set the foreground and background color of the
WebPages.
Answer: Color property is used to set the foreground colour while background-color
property is used to set background color of the WebPages.
Example: body {background-color: Black; color: white ;}
12. Which property of CSS controls the repetition of image inserted in a web page as a
background.
Answer: The property background-repeat is used to controls the repetition of image inserted
in a web page as a background.
Example: body {background-repeat: repeat-x ;}
or
Example: body {background-repeat: repeat-y ;}
or
Example: body {background-repeat: no-repeat ;}
*******