CSS Properties
A deep dive into modern and classic CSS properties.
Flashcards (3)
Manage the cards in this deck.
| Question | Answer | Actions |
|---|---|---|
| What is the difference between `display: grid` and `display: flex`? | `flex` is primarily for laying out items in a single dimension (either a row or a column). `grid` is designed for two-dimensional layout, managing both rows and columns simultaneously. | |
| Explain the CSS box model. | The CSS box model is a box that wraps around every HTML element. It consists of: margins, borders, padding, and the actual content. <mark style="background-color: #94B3C560;">This is a key concept for layout and spacing.</mark> | |
| What are CSS Custom Properties (Variables)? | Custom properties are entities defined by CSS authors which contain specific values to be reused throughout a document. They are set using custom property notation (e.g., `--main-color: black;`) and are accessed using the `var()` function (e.g., `color: var(--main-color);`). |