HTML and CSS Reference
In-Depth Information
Figure 8-1. The viewable area on a typical smartphone is 320 pixels, while the viewport the page
is laid out in may be much larger, requiring the user to pan to see all content on the page when
viewing at actual size.
Ideally, the web page width would correspond to the viewable area, and this is what
can be done to optimize a web page for mobile viewing. To begin with, there is a meta
element value that tells a mobile device to set the width of the layout viewport to the
width of the viewable area. To do this, the following would be added in the head section
of the web page:
<meta name="viewport" content="width=device-width" />
 
Search WWH ::




Custom Search