← All CSS Flashcard Decks

(Text, Borders, and Images) Flashcards

7 cards from real CSS practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 (Text, Borders, and Images) flashcards as text
  1. Which property makes text wrap to fit and break long words?

    Answer: word-wrap (overflow-wrap)

    overflow-wrap (word-wrap) lets long words break to prevent overflow.

  2. What does 'text-overflow: ellipsis' do?

    Answer: Shows '…' for clipped overflowing text

    ellipsis displays '…' to indicate clipped text.

  3. Which property sets only the border color?

    Answer: border-color

    border-color sets the color of all border edges.

  4. How do you make an image scale responsively within its container?

    Answer: max-width: 100%

    max-width: 100% keeps an image from exceeding its container width.

  5. Which property controls how white space inside an element is handled?

    Answer: white-space

    white-space controls collapsing of spaces and line breaks.

  6. What does 'object-fit: contain' do to an image?

    Answer: Scales the image to fit fully inside its box without cropping

    contain scales the image to fit entirely within the box, preserving aspect ratio.

  7. Which property adds shadow around an element's border box?

    Answer: box-shadow

    box-shadow applies a shadow to the element's box.