iPhone and the meta viewport tag


viewport and iphoneIf you want your content to look perfect on an iPhone you must use the viewport meta tag. Without it, your page may look like thumbnail. I had not heard of this tag until now. But it does the trick.


<meta name="viewport" content="width=320, user-scalable=yes">

Add this tag to the head section of the HTML page. If you set user-scalable to no, then your users wont be able to zoom in or out, so it is friendly to set it to yes (unless you are writing a page that is not meant to be zoomed in).

4 Responses to “iPhone and the meta viewport tag”

  1. Marc Says:

    Thanks. Just doing my first attempt at a mobile web site site and that was helpful.

  2. William Harry Says:

    Intresting post, i really enjoyed reading it.

  3. Slavi Says:

    I think the tag should be closed as:

  4. Slavi Says:

    my tag didn’t show up but there has to be a slash before the closing >

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: