General: Markup Mobile Entities

ebollens edited this page Oct 4, 2011 · 1 revision
Clone this wiki locally

Device Viewport

The XHTML MP 1.0 specification provides a viewport meta tag that belongs to the head entity of a document. The viewport <meta> tag allows a web page to inform the browser how it wishes to be treated. However, the browser does best when told to act as it was designed to act and thus the framework recommends specifying the viewport <meta> tag as such:

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;" />

This particular entity definition should ensure a unified browsing experience across XHTML MP 1.0 devices that process the viewport meta tag. It is highly recommended for all mobile framework driven applications.

Initiating Telephone Calls

The XHTML MP 1.0 includes an href route property as part of the a entity that requests the device make a phone call when clicked by prefixing the full phone number, including country code, with the tel: prefix.

<a href="tel:+15555551212">+1 (555) 555-1212</a>

Note: Some new browsers such as Mobile Safari often automatically generate phone numbers. However, this feature is not completely dependable, and does not port to other browsers. For continuity, you can turn this feature off.

<meta name="format-detection" content="telephone=no" />

Doing this informs HTML 5 browser to only create phone number links where explicitly specified.