What does CSS describe in a document?
The document’s style.
What three ways can CSS be included in an HTML document?
Inline on an element, in a `<style>` element, or in an external stylesheet.
Which symbol represents the universal CSS selector?
*
Which CSS selector form targets an element type such as `h1`?
An element selector.
Which CSS selector form uses an identifier such as `#myId`?
An ID selector.
Which CSS selector form uses a class such as `.myClass`?
A class selector.
What does the CSS `color` property set?
Foreground color.
What does CSS `text-align` align text within?
Its parent element.
What does `right` mean for CSS `text-align`?
The parent element’s right side.
What numeric range can CSS `font-weight` use?
100 to 900.
Which four areas make up the CSS box model?
Content, padding, border, and margin.
By default, what area do an element’s `height` and `width` dimensions set?
The content area.
What width does `display: block` take?
The available width.
What happens to document flow when `display: none` hides an element?
The element is removed from the flow without reserving space.
What dimension usually determines the reference for a percentage width on an element?
The corresponding dimension of its parent element.
For an element's font size, what does `em` refer to?
The parent element's font size.
What does the CSS `position` property determine?
How an element is positioned in a document.
Which positioning mode ignores top, right, bottom, left, and z-index?
`static`.
Which positioning mode uses the closest positioned ancestor and removes the element from flow?
`absolute`.
What kind of layout method is Flexbox?
A one-dimensional layout method for arranging items in rows or columns.
What display value enables the flex model on a container?
flex
Which property aligns flex items along the main axis?
justify-content
What conditions can a CSS media query use to apply responsive styles?
Conditions such as viewport width or orientation.
What does a CSS transition define?
How an element changes between two states over time.
What does the CSS `transform` property apply to an element?
Two-dimensional or three-dimensional transformations.
What do CSS animations use to animate elements?
Keyframes and animation properties.
Which style takes precedence over external and internal styles?
An inline style.
What does a CSS selector identify?
The element or elements to which a CSS rule applies.
How can CSS colors be represented using RGB values?
With values such as `rgb(255, 0, 0)`.
How can CSS colors be represented using hexadecimal values?
With values such as `#ff0000`.
Which line styles can CSS `text-decoration` apply?
Underline, overline, and line-through.
Which CSS property value removes text decoration, including hyperlink decoration?
`none`.
How can CSS `font-family` specify fallback choices?
By listing multiple font families.
What does CSS `line-height` set?
Line spacing.
Which values does CSS `text-transform` support?
`uppercase`, `lowercase`, `capitalize`, and `none`.
Which properties can specify a CSS border separately?
`border-width`, `border-style`, and `border-color`.
What does `border-radius` round on an element?
Its outer border edge.
In what order does a four-value `padding` shorthand specify sides?
Top, right, bottom, left.
What does the alpha channel control in an RGBA color?
Opacity from 0 to 1.
What does `vh` measure relative to?
One percent of the viewport height.
What determines an element's `sticky` positioning?
The user's scroll position.
What determines an element’s stack level in CSS?
The `z-index` value.
Which property determines the axis and direction of flex items?
flex-direction
What is the default value of flex-direction?
row
Which property aligns an individual item along the cross axis?
align-self
What does a flex-grow value of 0 mean?
The item does not grow.
Which properties determine how much flex items grow or shrink relative to others?
flex-grow and flex-shrink
What two width conditions can a CSS media query test?
An exact width or a minimum width.
Which four properties configure CSS transitions?
`transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`.
What is the CSS transition shorthand example?
`transition: font-size 2s ease-in-out 0.2s`.
In what order does the transition shorthand example list its values?
Property, duration, timing function, and delay.
Which CSS function rotates an element by 45 degrees?
`rotate(45deg)`.
Which CSS function scales an element?
`scale`.
Which CSS function skews an element by 30 degrees?
`skew(30deg)`.
Which markers can a CSS keyframes rule use to define animation states?
The `from` and `to` keywords or percentage points.
Which property sets a CSS animation’s duration?
`animation-duration`.
What is the CSS animation shorthand example?
`animation: myName 2s linear 3s infinite normal`.
Answer 23 questions on CSS Styling and Layout.
1. What is the primary role of CSS in a web document?
2. A developer wants to place CSS rules in the same HTML document but separate from the elements they style. Where should the rules go?
Go over the full study guide for CSS Styling and Layout.
Read the study guide →Upload your class notes and Revizly writes your flashcards in about a minute.
Flashcard maker