Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

For responsive pages, what does this meta tag do?

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

1 Answer

I can't see what you are referring to but I assume you mean a tag like this...

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

Basically, mobile browsers try to fake being a "real" browser. In result, they show the full zoomed out desktop version of a site regardless of width.

This meta tag tells the browser that the width of the device is the width of the site. The initial scale needs to be set to 1.0 so it doesn't zoom the site in or out. Hope that clears things up.

Thats very clairvoyant of you Dave! Awesome help! Thanks SO much!