What are SVG viewport and viewBox? [ A beginners guide to SVG part 3 ]

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

BeginnerUI18 min

About this video

Explains the difference between the SVG viewport and the viewBox, using a browser window and a Photoshop zoom-and-pan analogy. Aimed at people new to SVG who want to understand how its coordinate settings work.

What you’ll learn

  • Explain how the SVG viewport sets the displayed size of an SVG
  • Describe how the viewBox zooms and pans the SVG canvas
  • Predict how changing viewBox values affects what an SVG shows