Correct option is A
By default, a CSS/HTML background set with background-image (or the legacy <body background="...">) uses background-repeat: repeat.
That means the image tiles both horizontally and vertically to fill the viewport or element’s box.
No automatic stretching or clipping occurs unless additional properties are specified.
You can change this behavior with background-repeat: no-repeat, repeat-x, or repeat-y.
For scaling, use background-size: cover or contain; for positioning, use background-position.
Thus, a smaller background image repeats/tiles by default.
No automatic stretching or clipping occurs unless additional properties are specified.
You can change this behavior with background-repeat: no-repeat, repeat-x, or repeat-y.
For scaling, use background-size: cover or contain; for positioning, use background-position.
Thus, a smaller background image repeats/tiles by default.
Important Key Points
- Default repeat: background-repeat defaults to repeat (tiling on both axes).
- Disable tiling: Use no-repeat to show the image only once.
- Scale image: background-size: cover|contain|<length|%> controls stretching/scaling.
- Positioning: background-position sets where the first tile is placed (e.g., center, top left).
- Attachment: background-attachment: fixed pins the background while content scrolls.
- Element scope: Rules apply to any element, not just <body>.
Knowledge Booster
- Why (b) is wrong: Stretching doesn’t happen by default; it needs background-size (e.g., cover or 100% 100%).
- Why (c) is wrong: Clipping is not the default; tiling fills the space.
- Why (d) is wrong: No blank area appears by default—tiling covers the entire page unless no-repeat is set.