Intro to CSS (1 of 2) Flashcards
1) When the author describes the benefits of CSS, what does he say CSS controls?
CSS controls the appearance of a website. By having CSS separate from HTML, you don’t have to change the structure to change the appearance of the website.
2) [True or False] Styles are applied in the order in which they are found, cascading down from external to local styles.
True
3) Why do browsers give end users so much control over how the page is viewed?
Goal of any website is to make the content accessible to the individual user. Browsers allow users to change the contrast ratio or font size of a website to fit users’ needs.
4) What 2 parts make up a CSS rule?
Property and value
5) What separates the property from the value in a CSS rule?
Colon
6) As described by the author, what type of selector is global in nature?
Element selector
7) [Critical Thinking] Write a selector that only applies to p tags with a class named blue.
p.blue { Color: black }
8) [True or False] descendant selectors apply to any nested element, no matter how deep it’s found within the page structure.
True
9) [Critical Thinking] Write an example of a group selector.
h1, h2, p {
}
10) [True or False] The author advises to try to structure your code to add meaning to the content, without even thinking of the styling.
True
11) Where are embedded styles typically located?
Located in the head block of a document
12) Why does the author discourage the use of inline styles?
Hard to overwrite and maintain over time. It’s cumbersome and inefficient to track down a line of code with inline styles.
13) What is the single sentence the author gives that sums up how rules are applied?
The last rule applied wins!
14) [True or False] Inheritance says that the child element will inherit the properties applied to the parent.
True
15) What does it mean when the author says that styles are cumulative?
Style rules add up. Broad selector-declarations are applied first, then more specific selector-declaration modifies last inherited rule.