Chapter 4: How to use CSS to format the elements of a web page

COMPLETION

1.To include styles in an HTML document, you can use an external style sheet, an embedded style sheet or ______attributes on inline HTML elements.

2.To include a CSS file in an HTML document, you use the ______element.

3.You use a JavaScript ______to help older browsers recognize the HTML5 structural elements.

4.You can use ems or percentages to specify a ______unit of measurement.

5.To specify a color in a CSS rule, you can code a/an ______value in percentages or in hexidecimal numbers.

6.When you code a selector that selects by ______, the rule set applies to just one HTML element.

7.In the rule set that follows, the selector applies to all elements that have “red” as their ______name.

.red { color: red; }

8.To apply styles to all elements, you can use the ______selector.

9.In the rule set that follows, the selector selects all paragraph elements that are ______of the element with “main” as its id.

#main p { font-size: 75%; }

10.For user accessibility, you should apply the same formatting to the :focus pseudo-class for an element as you apply to the ______pseudo-class for that element.

11.If more than one rule set is applied to an element, the rule set with the selector that has the highest ______is used.

12.Times New Roman is a font ______.

13.Underlining and overlining are a type of text formatting that is referred to as text ______.

14.To provide the top-level formatting for a page, a style sheet commonly formats

______and ______semantic elements.

15.An ______unit of measurement is equal to the font size for the current font that is specified.

16.Which of the following is NOT one of the ways that you can specify a color in CSS?

a.color: white;

b.color: rgb(50%, 25%, 25%);

c.color: getColor("red");

d.color: #cd5c5c;

17.Which of the following is a valid selector for a class named menu?

a.menu

b.#menu

c..menu

d.> menu

18.A child selector in CSS allows you to select elements that

a.are any descendant of an element

b.are a direct descendant of an element

c.have an attribute that matches the specified child

d.have a class that matches the specified child

19.Pseudo-class selectors let you apply formatting

a.to selected portions of text

b.to elements that specify multiple classes

c.when a button control is clicked

d.when specific conditions occur

20.If two CSS rules conflict, which of the following rules overrides the other rule?

a.the rule marked as !important in a web page

b.the normal rule in a web page

c.the normal rule in a user style sheet

d.the default rule for the web browser