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

What is <meta name="viewpoint" content="width=device-width, intial-scale=1.0">

What is <meta name="viewpoint" content="width=device-width, intial-scale=1.0"> and what does it do

2 Answers

The meta tag helps control the mobile layout of the webpage. The first part, viewport is the users visible area of the web page. The viewport will vary between devices and be smaller on mobile. This meta tag basically helps let us take control of this viewport.

width=device-width sets the webpages width to the width of the device screen. initial-scale=1.0 sets the initial zoom level of the webpage when it's loaded.

Without this meta tag you would notice everything on a mobile would be very small and squeezed to fit the content to look the same as it does on a monitor.

But also the meta tag itself is a lot more than that. It is like information about your webpage and also helps with search engine optimisation for your webpage.

:)

Good explanation from Anil, you might find these links useful as well:

MDN

Tuts Plus

CSS Tricks

Also check out the CSS Basics course on Treehouse. It's covered in this video

Hope this helps :)

Thank you very much.