control how a webpage is displayed on different devices by adjusting the width and initial zoom level of the viewport to match the device's screen size
<meta name="viewport" content="width=device-width, initial-scale=1">
width=device-width
- sets the width of the viewport to be equal to the width of the device's screen. This ensures that the webpage adapts and fills the entire width of the device, regardless of its specific screen size or resolution.
CSS media query
works properly with any device by setting device width to viewport
initial-scale=1
- sets the initial zoom level when the webpage is first loaded. A value of 1 means that the webpage will be displayed at a 1:1 ratio, without any zooming or scaling applied
by Valeri Tandilashvili
10 months ago
HTML
meta tags
0
Pro tip: use ```triple backticks around text``` to write in code fences