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

CSS CSS Layout CSS Media Queries The meta Viewport Declaration

karan Badhwar
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
karan Badhwar
Web Development Techdegree Graduate 18,135 Points

Meta tag for Viewport

this means that the code we have written with Media Queries won't work until we add this Meta tag, because the browser will Zoom out the Webpage to be the size of the device on which it was made? Just Confirming to see if i got it right?

1 Answer

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

That is correct.

This is the tag that when used correctly forces the device to scale a certain way.

This is an example I use the most.

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