Skip to main content
InterviewHubPRO
Section Overview
Q10

Question 10 of 50

Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

20%
HTML5 & Web APIs (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

What is the purpose of the `<meta name="viewport">` tag in responsive design?

junior LevelCode ExamplehtmlBasic

In Simple Words:

html
<meta name="viewport" content="width=device-width, initial-scale=1.0">
  • By default, mobile browsers assume desktop websites and render pages inside an artificial 980px virtual viewport, zooming out until text is microscopic.
  • width=device-width: Tells the browser to set the viewport width to the physical pixel width of the device screen.
  • initial-scale=1.0: Sets the default 1:1 zoom level, enabling responsive CSS media queries and flexbox layouts to work correctly.