O'Reilly logo

Responsive Web Design with jQuery by Gilberto Crespo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Setting up the meta tag of viewport before starting

The meta tag of viewport works by displaying just a portion of the full viewable area. This configuration is very important when we are crafting a responsive website because, without it, the mobile device browser will return a zoomed-out version of the website to the user. There is no standard syntax for its usage, but all common mobile browsers support the following tag:

<meta name="viewport" content="width=device-width">

Other features such as initial-scale can be used to define the meta tag of viewport, which may prevent the user from opening the website in the zoomed-in mode and maximum-scale will restrict the user from zooming in on the content. The following code is an example of viewport ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required