(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
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.
What does 'text-overflow: ellipsis' do?
Answer: Shows '…' for clipped overflowing text
ellipsis displays '…' to indicate clipped text.
Which property sets only the border color?
Answer: border-color
border-color sets the color of all border edges.
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.
Which property controls how white space inside an element is handled?
Answer: white-space
white-space controls collapsing of spaces and line breaks.
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.
Which property adds shadow around an element's border box?
Answer: box-shadow
box-shadow applies a shadow to the element's box.