Ch4: Cascading Style Sheets Basics Flashcards
Which type of CSS is coded in the body of the web page as an attribute of an HTML tag?
inline
Inline CSS is configured as a value of the style attribute within an HTML tag.
Which of the following can be a CSS selector?
an HTML element name, a class name, and an id name can be configured as CSS selectors
A CSS selector can be configured with an HTML element name, a class name, or an ID name.
Which of the following is the CSS property used to set the background color?
background-color
The background-color property configures background color of an element.
Which of the following describes two components of CSS rules?
selectors and declarations
A CSS rule contains a selector and one or more declarations.
Which of the following associates a web page with an external style sheet?
Coding a link element with the rel and href attributes
The link element used with the rel and href attributes associates an external style sheet with a web page.
Which of the following configures a CSS class called news with text and background colors?
Code the class name as “.news” along with the color and background-color properties
An external style sheet uses the _____ file extension.
CSS
The CSS file extension indicates an external style sheet file.
Where do you place the code to associate a web page with an external style sheet?
in the head section of the web page document
Code a link element in the head section to associate a web page with an external style sheet.
Which of the following configures a background color of #FFF8DC for a web page using CSS?
Code “body” as the CSS selector along with the background-color property.
Which of the following do you configure to apply a style to more than one area on a web page?
class
A class can be applied to more than one area on a web page.