Meta for the website dispaly

What meta do I need to add to my site so when I open the site from a phone, the elements on the screen are resized to the size of the phone so they look right on the screen.

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

Technically you don’t have to have the initial-scale=1.0 so you could just have <meta name="viewport" content="width=device-width"> but it sets the initial zoom (1.0 = 100%, 2.0 = 200% and so on)

2 Likes

W3Schools is a great resource for this kind of stuff :slight_smile:

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.