A small piece of HTML that tells a phone or tablet browser how wide to treat the page and how much to zoom, so a responsive layout appears at the correct size instead of a shrunken desktop view.
Synonyms
- viewport tag
Related terms
In plain words
- the setting that stops a website looking tiny and zoomed-out on a phone
Usage example
Without the viewport meta tag, the mobile site rendered at desktop width and everything looked minuscule.
Don't confuse with…
- media queryThe viewport meta tag sets the base width the browser assumes; media queries then apply different styles at different widths.
Categories
- Responsive & adaptive design