DHTML & CSS BY ZAKII
DHTML & CSS BY ZAKII
Made by Zakii
A. Multiple Choice Questions with Answers
2. **The units '%' and 'em' allow the user to adjust the font size according to him/her.**
**
Answer: ** (b) '%' and 'em'
3. **The 'text-decoration' property makes it possible to add different 'decorations' or 'effects' to text.**
**
Answer: ** Text-decoration property *(Correct answer not listed in options)*
5. **CSS is a style sheet language used for describing the look and formatting of a document written
in a markup language.**
**
Answer: ** (c) Cascading Style Sheets (CSS)
6. **Which property is used to give the specified spacing between the text characters?**
**
Answer: ** (b) Letter Spacing
7. **The units 'px' and 'pt' make the font size absolute.**
**
Answer: ** (d) 'pt'
8. **The 'background-repeat' property repeats the image both horizontally and vertically to cover the
entire screen.**
**
Answer: ** (d) Background Repeat property
Made by Zakii
CSS Questions and Answers
**1. Font-family style differentiates between _serif_, _sans-serif_, and _monospace_ font faces.**
**2. The font-variant property refers to the _small-caps_ variant of the font face.**
**4. The CSS specification also allows browsers to render any _non-numeric_ value as normal.**
**5. The text decoration has to be rendered with _specified effects_ (e.g., underline, overline,
line-through).**
**6. The _text-indent_ property allows you to add effects to text paragraphs by applying an indent to
the first line of the paragraph.**
**7. Font variant property is used to select _normal_ or _small-caps_ variants of a font.**
**8. The _color_ property describes the foreground color of text to be displayed in the browser.**
**9. The property font-style defines the chosen font either in _normal_, _italic_, or _oblique_.**
**10. The property _font-family_ is used to apply a prioritized list of fonts in a web page.**
**12. The _background-color_ property describes the background color of the browser window.**
**13. The _background-image_ property is used to insert a background image in a web page.**
**5. List down the various font-family properties. Give an example of each:**
- **Serif:** e.g., Times New Roman
- **Sans-serif:** e.g., Arial
- **Monospace:** e.g., Courier New
**Example in CSS:**
p { font-family: Arial, sans-serif; }
**8. Mention the properties of CSS used to insert letter spacing in a line:**
Made by Zakii
CSS Questions and Answers
**9. How many types of text alignments can be included in a CSS page?**
**
Answer: ** Four types: left, right, center, and justify.
**Example:**
p { text-align: justify; }
**11. Explain the CSS properties to set the foreground and background color of webpages:**
- **Foreground Color:** Controlled using the color property.
- **Background Color:** Controlled using the background-color property.
**Example:**
body { color: #000000; background-color: #FFFFFF; }
**12. Which property of CSS controls the repetition of an image inserted in a web page as a
background?**
**
Answer: ** The background-repeat property.
**Example:**
body { background-repeat: no-repeat; }