LearnKey Adobe Illustrator Course Practice Test

Access More Questions
What is the purpose of the viewBox attribute in SVG and why is it important for scalable rendering?
Correct Answer:
viewBox defines the aspect and coordinate system of an SVG, enabling scalable rendering.
Explanation:
The viewBox is about mapping the drawing’s internal coordinate system to the space where it will be displayed, which is what makes SVG scalable. It defines four numbers—min-x, min-y, width, and height—that tell the browser where the drawing starts and how big its coordinate area is. When the SVG is shown at different sizes, the browser uses that map to scale and translate the vector shapes so the image keeps its proportions and layout. Because the content is vector, scaling the viewBox input lets the same drawing render crisply at any size without pixelation, and stroke lines and shapes scale consistently with the rest of the artwork. If the rendered box’s aspect ratio doesn’t match the viewBox, you can use preserveAspectRatio to decide whether to crop, letterbox, or stretch to avoid distortion. The viewBox isn’t about stroke width, color spaces, or raster sampling—the latter concepts relate to styling, color management, and rasterization, not to how the SVG defines its coordinate space and scaling.

Access more questions from this quiz

Continue to LearnKey Adobe Illustrator Course Practice Test for more practice questions and the full quiz experience.

Access More Questions