Application of meta tags in mobile platform development _ HTML/Xhtml _ webpage Creation

Source: Internet
Author: User
This article mainly introduces the application details of meta tags in mobile platform development. For more information about meta tags, see, it will always be inside the head element. It must have special feelings for SEO friends for meta. Today we will talk about the meta tag of the mobile platform, what are the magical effects of meta tags on mobile platforms?

1. Meta viewport

Speaking of the meta tag of the mobile platform, you have to talk about the viewport. What is the viewport?
Viewport is the visible area. For a desktop browser, viewport is the area used to view webpages after all the toolbar, Status Bar, and scroll bar are removed.
. For traditional WEB pages, the 980 width display on the iphone is normal and full screen, but it may be a problem for webapps, on the iphone, our webapp is usually 320 in width under the vertical screen. What is the effect of our 320 page on the iphone? Some people may think that the iPhone is not 320 in width. It should be full screen. What is the truth? Let's take a look at the following display on the iPhone:

The Code is as follows:






Meta Viewport




AppUE




Therefore, we must change the viewport so that we can set the following attribute values:

Width: the width of the viewport. The value ranges from 200 to 10,000. The default value is 980 pixels)
Height: the height of the viewport. The value ranges from 223 to 10,000)
Initial-scale: initial scaling ratio (range:> 0 to 10)
Minimum-scale: minimum scale that allows users to scale
Maximum-scale: maximum scale allowed by users
User-scalable: whether the user can manually Scale

You can set one or more of these attributes without having to set them at the same time. The iPhone automatically calculates other attribute values based on the attributes you set, rather than directly using the default values.

If you set initial-scale to 1, the width and height values are automatically 320*356 (not 320*480 because the address bar occupies space) at the portrait screen ), the screen size is 480*208. Similarly, if you only set the width, the initial-scale and height values are automatically calculated. For example, if you set width = 320, initial-scale is 1 when the screen is portrait, and 1.5 when the screen is landscape. So how can we let Safari know about these settings? In fact, it is very simple, just a meta, like:


The Code is as follows:



Now, we can layout our page in full screen mode, so we don't have to worry about the small page!

2. format-detection of Meta

The Code is as follows:



The link style is not added to a string of numbers you clearly write, and the iPhone will automatically add the link style to your text, and click this number to automatically dial! How can I remove this dial-up link? At this time, our meta should be superb again. The Code is as follows:

If telephone is set to no, the number cannot be converted to a dial-up link!
Telephone = yes enables converting numbers to dial-up links. To enable the conversion function, you do not need to write this meta. By default, this function is enabled!

3. Meta-apple-mobile-web-app-capable

The Code is as follows:



This meta is used to delete the default Apple toolbar and menu bar. Content has two values: "yes" and "no". When we need to display the toolbar and menu bar, this line of meta does not need to be added. The default value is display.

4. Meta-apple-mobile-web-app-status-bar-style

The Code is as follows:






Controls the display style of the status bar.

The Code is as follows:


Status-bar-style: black
Status-bar-style: black-translucent

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.