1

I want to know what this sample of code means :

<meta name="viewport" content="width=device-width, initial-scale=1">

Does somebody know ?

Machavity
  • 30,841
  • 27
  • 92
  • 100
jozinho22
  • 459
  • 2
  • 7
  • 24
  • Does this answer your question? [How is the meta viewport tag used, and what does it do?](https://stackoverflow.com/questions/10892463/how-is-the-meta-viewport-tag-used-and-what-does-it-do) – Quentin Jun 24 '20 at 16:05

1 Answers1

1

This is a meta-tag commonly used in responsive web-design. Meta-tags are located in the < head > section of the page. In this example it sets the pixel-width of the page to be the same as the pixel-width of the device it is viewed on, aswell as setting the starting zoom-level to default. This is important because in responsive web-design you often want to display content based on the device width.

Commonly used properties for this meta-tag are:

width=
height=
initial-scale=
maximum-scale=
minimum-scale=
user-scalable=