W3C HTML 4.0 Guidelines for Mobile Access W3C Note - 15 March 1999 This version: Latest version: Editors: Tomihisa Kamada, ACCESS Co.,Ltd. Takuya Asada, W3C Masayasu Ishikawa, W3C Shin'ichi Matsui, W3C/Panasonic Copyright (c) 1998-1999 W3C (MIT, INRIA, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply. Status of This Document This document is a Note made available by the World Wide Web Consortium (W3C) for discussion. This document may be updated, replaced or rendered obsolete by other documents at any time. It is inappropriate to use this document as reference material or to cite them as other than "work in progress". This is work in progress, and does not imply endorsement by, or the consensus of, either W3C membership or members of the Mobile Access Interest Group (members only). This document has been produced as part of the W3C Mobile Access Activity. Please send comments about this document to the public mailing list www-mobile@w3.org (archive). Abstract This document describes guidelines for content authors how to create HTML 4.0 contents to be acceptable to mobile devices as much as possible. Available Formats This document is available in the following formats: HTML: A plain text file: HTML as a gzip'ed tar file, including accompanying resources: HTML as a zip file, including accompanying resources: In case of a discrepancy between the various formats of the document, is considered the definitive version. Table of Contents 1. Introduction 2. Requirements from Mobile Access 1. Hardware Restrictions 2. Narrow Bandwidth Networking 3. Accessibility Requirements 3. Guidelines for Mobile Access 1. Styles 2. Scripts, Event Handlers 3. Forms 4. Frames 5. Image Maps 6. Tables 7. Objects and Images 8. Access keys 4. A Sample HTML 4.0 DTD for Mobile Access 5. Concluding Remarks and Future Directions * References * Appendix HTML 4.0 Mobile DTD + Sample SGML catalog + Document Type Definition 1. Introduction Ever since the Internet industry exploded a few years ago, numerous related industries have spawned and flourished from the standard WWW (World Wide Web) infrastructure. This growth is most attributable to the exponential growth of Internet users all over the world. Today, Internet access is no longer limited to personal computers and powerful workstations in your office, but is reaching into the your home, as well as on the road. A new class of electronics devices with Internet access capability called "Information Appliances" was recently born. This Internet access capability is embedded in devices such as televisions, set top boxes, home game machines, telephone-based terminals, PDAs, car navigation systems and cellular phones. These Internet appliances will drive the merger of wireless and wired Internet world that will eventually create a much larger industry than today's predominantly wired Internet industry. The need to support this new class of information appliances while still meeting the W3C standards and the rigid design requirements are the challenges this evolving industry faces today. This document describes guidelines for content authors how to use HTML 4.0 Specification [HTML40] effectively for "Mobile Access", and some design notes for user agent manufacturers. 2. Requirements from Mobile Access There are a wide range of mobile devices in the market. The typical product examples are as follows: * PDA * mobile phone * pager * embedded system * automobile information appliance (car navigation system) * mobile game machine * digital book reader * smart watch This section summarizes the requirements from "Mobile Access". 2.1. Hardware Restrictions As described in [CompactHTML], there are several hardware restrictions in mobile devices. The major characteristics are as follows: * small memory capacity * small display space * less powerful CPU * limited input method * no or small data storage * limited power consumption These characteristics have to be taken into account in designing the user agent functionality for mobile devices, as well as creating mobile-friendly contents. 2.2. Narrow Bandwidth Networking The size of contents should be small in the case of narrow bandwidth and low speed wireless networking. The major characteristics of today's wireless connection are as follows: * slow speed * unstable * expensive * non-IP connection These restrictions depend on underlying communication bearers. The infrastructure will be improved in the third generation wireless phone networking. 2.3. Accessibility Requirements Simple and easy operations of information appliances are very important. Unlike PC user interface, keyboard and mouse are not suitable for mobile devices. Rather, intuitive operation like a four-button interface (cursor forward, cursor back, select, and back buttons) is required. In this sense, some kind of accessibility considerations, as described in WAI Accessibility Guidelines, should be taken into account. In general, WAI Accessiblity Guidelines are also useful for mobile access. For example, the "accesskey" attribute of HTML 4.0 can be used to assign buttons to links or form selections. Also, alternative text for images should be provided via "alt" attribute so that mobile devices can make use of text descriptions instead of large images. For more information, see section 3.8 and 3.7 respectively. 3. Guidelines for Mobile Access This section describes the detail of the HTML 4.0 guidelines for mobile access. In order to meet the requirements as described in section 2, we use HTML 4.0 Strict, which excludes the presentation attributes and elements, as a suitable baseline for mobile access. Thus, the following guidelines assume to use HTML 4.0 Strict. 3.1. Styles Usual mobile devices have small size of screens, and limited display capabilities, thus in many cases style sheets are not supported, or its support is limited. When style sheets are used, external style sheets are recommended from the viewpoint of content size and separation of structure and style. In this way, user agents which don't support style sheets don't have to load unnecessary style sheets. The "media" attribute can be used so that user agents can select appropriate style sheets. See section 14.2.4 of [HTML40] for more detail. The STYLE element can be also used, but inline style sheets via "style" attribute is not preferred, because it's not flexible and almost like the presentation attributes which are deprecated and excluded from the HTML 4.0 Strict. Contents should be readable without style sheets so that devices which don't support style sheets can still render contents reasonably. See also section 2.10 of Techniques for [WAI-WEBCONTENT]. Note for User Agents: It is desirable that even if user agents don't support style sheets, it should parse STYLE elements not to show styles nor to cause any other side-effects. 3.2. Scripts, Event Handlers Usual mobile devices have limitation of memory storage, CPU power and so on, thus in many cases scripting are not supported. It should not be assumed that scripts will always be executed. Contents should be readable even if scripts are not executed. See also section 2.13 of Techniques for [WAI-WEBCONTENT]. Note for User Agents: It is desirable that even if user agents don't support scripts, it should parse SCRIPT elements not to show scripts nor to cause any other side-effects. 3.3. Forms Usual mobile devices support basic forms, but they don't have keyboards like desktop PCs. Content authors should keep in mind that it will be hard for users of mobile devices to input many characters. Since sometimes mobile devices don't have local file systems, some features, which depend on local file system, such as file upload, should not be used. Many mobile devices do not support images, thus value "image" for "type" attribute of INPUT element should not be used. As described in 3.2, authors should not rely on scripting, and should avoid using attributes for event handling, such as onsubmit. See also section 2.12 of Techniques for [WAI-WEBCONTENT]. 3.4. Frames Usual mobile devices have small size of screens, and some of them support only textual information. Frames strongly depend on screen interface, and are not part of the HTML 4.0 Strict. Therefore, frames should not be used. If there is compelling reason to use frames, make sure that those contents have the descriptions below: * Provide a fallback content for contents that contain frames using NOFRAMES at the end of each FRAMESET. * Name each frame via the "title" attribute on FRAME elements so that users can keep track of frames by name. See also section 2.11 of Techniques for [WAI-WEBCONTENT]. Note for User Agents: If user agents don't support frames, it should render contents of the NOFRAMES element. Also, even if user agents can't render frames, it is desirable to provide links to each frame, so that users can access to contents of each frame. 3.5. Image Maps On mobile devices, it cannot be generally assumed that images are always rendered, nor can be pointed by pointing devices like mouse. Therefore, server-side image maps should not be used. On the other hand, client-side image maps can be used even if images are not rendered nor can be pointed, so authors may include client-side image maps into their contents. But this is acceptable only when alternative descriptions are provided via "alt" attribute of AREA element, which is a required attribute in HTML 4.0, as in many cases images are not rendered on mobile devices, or pointing on images is impossible even if images can be rendered, as described above. See also section 2.7 of Techniques for [WAI-WEBCONTENT]. Note for User Agents: It will be desirable that user agents render images and provide selections with pointing (using area information) if possible. Even if rendering images or selection with pointing are impossible, they should provide access to linked resource of each area via "alt" attribute of AREA element. 3.6. Tables Many mobile devices have small size of screens. If contents have table descriptions, it will be very difficult to browse them in mobile devices. In addition, though it would be possible to restructure tables in accessible way by following guidelines as described in Guideline 7 of [WAI-WEBCONTENT], it will be difficult for mobile devices to process complex tables due to the hardware restrictions as described in 2.1. It would be, therefore, safe to avoid using tables whenever possible. Consider alternative structures, e.g. lists, whenever appropriate. Content authors should not expect tables will always be processed in mobile devices. Note for User Agents: Even if it would be difficult, user agents may parse and render tables if possible. For example, the CAPTION element and "summary" attribute are usable to summarize tables. See also [WAI-USERAGENT]. 3.7. Objects and Images The OBJECT elements, which are designed to embed various objects including images into HTML documents, are also useful in mobile devices. For example, contents which have voice (speech) contents for cell phones and contents which have graphical maps for car navigation systems may become typical contents for those devices, as these contents match essential needs and functions of them. When embedding objects via OBJECT element, alternative contents should be provided by the fallback mechanism of OBJECT element. These alternative contents should end up with texts. An example below is quoted from [HTML40]:

text describing the image...

In general, images should be embedded via OBJECT element, as it has better fallback mechanism, but IMG element may also be used. In this case, alternative description via "alt" attribute, which is required in [HTML40], should be provided for user agents which cannot or do not render images. This guideline doesn't specify nor recommend specific formats for images. If the image represents an important information, a long description should be provided via longdesc attribute of IMG element, in addition to alternative text via alt attribute. The APPLET element, which is not part of the HTML 4.0 Strict, should not be used in favor of the OBJECT element. Note for User Agents: User agents should try to render nested objects according to the precedence rules described in section 13.3.1 of [HTML40]. Even if user agents don't support OBJECT elements, they should render alternative content of OBJECT element as a fallback. If a long description is provided via longdesc attribute of IMG element, user agents should provide access to that long description. 3.8. Access keys In general, it cannot be assumed that input methods which consists of a (full) keyboard and a pointing device such as mouse are available in mobile devices. It is desirable that description for efficient use of input methods on mobile devices are provided in contents. From this viewpoint, assigning access keys via "accesskey" attribute (for A, AREA, BUTTON, INPUT, LABEL, LEGEND and TEXTAREA elements) will be effective when it is available. This may improve accessibility of links or form related operations. But the use of "accesskey" attribute needs careful consideration. 1. In many mobile devices, available keys are limited. It cannot be assumed that all keys in "full" keyboards are available. 2. Available keys differ among mobile devices. For example, cell phones will usually have "0"-"9", "*" and "#" keys, but the same assumption cannot be applied for most pagers or mobile game machines. 3. There may be some mobile devices that cannot use "accesskey" attribute at all. For example, devices only for voice browsing will not use access "keys". Content authors should not rely on access keys for navigation. Note for User Agents: User agents should parse and activate access keys specified via "accesskey" attribute whenever possible, but they should ignore access keys when those keys are not available. 4. A Sample HTML 4.0 DTD for Mobile Access As mentioned in section 3, HTML 4.0 Strict will be suitable as a baseline for mobile access. This section explains a sample description of DTD, called HTML 4.0 Mobile, as a subset of the HTML 4.0 Strict DTD in order to reflect the guidelines described in section 3. This DTD is also designed to be a subset of ISO/IEC 15445, a.k.a. ISO-HTML [ISO-HTML]. ISO-HTML is a well-defined subset of HTML 4.0 Strict, so conforming to this DTD will ensure interoperability across wide variety of platforms, including mobile devices. The complete definition of DTD for HTML 4.0 Mobile is described in the Appendix. Note: At the time of writing this document, [ISO-HTML] is still under work in progress. It has not yet established as an International Standard. The HTML 4.0 Mobile DTD is provided to help authors creating documents following the guidelines described in this document (e.g. by validating with an SGML parser like nsgmls [SP]). Not all guidelines can be expressed in the DTD, but hopefully, this DTD will make it easier to follow these guidelines. Typically, this DTD can be invoked as follows: ... For example, this DTD excludes style attribute and event handlers like onclick, so when content authors validate their documents against this DTD, those attributes will be flagged as unknown attributes and then authors can be aware that those attributes are not recommended. If documents are validated against this DTD, those documents can be labeled as valid HTML 4.0 Strict. Note. If you use the following DOCTYPE internal subset: ]> ... then you can enforce the strict heading order as required in [ISO-HTML]. In any case, ensuring the validity of documents is quite important, particularly for mobile access, because most mobile devices cannot afford to perform costly error recovery. 5. Concluding Remarks and Future Directions We believe that wireless network services should not be isolated from the growing Internet services. This guidelines can be used for this purpose. It can be referred as recommended guidelines for HTML mobile Internet services and HTML browsing software for a variety of mobile devices. Currently the work for the next generation of HTML [XHTML] is going on, which will be a family of modularized document types that will make it easier to extend and subset HTML. Since mobile device category is one of major targets for [XHTML], mobile profile(s) and mobile module(s) will be defined as part of [XHTML]. Note that the effort for converging [XHTML] and the Wireless Markup Language [WML], for the Wireless Application Protocol (WAP), is currently ongoing between the W3C and the WAP Forum [WAP-W3C, WML1.1]. Hopefully, [WML] will be among the family of [XHTML] document types in the future. The worldwide standard for wireless digital phone networking protocols (IMT-2000) will be established very soon. New services based on IMT-2000 standard will start in the early 21st century. The bandwidth of the network is expected to be wide enough for IP connections and Internet-oriented contents. This implies that HTML and related recommendations for mobile Internet will become more and more important. This HTML 4.0 guidelines for mobile access will be a good step towards future HTML modularity for mobile phones. References [CompactHTML] "Compact HTML for Small Information Appliances", W3C Note, T. Kamada, 9 February 1998. Available at [HTML40] "HTML 4.0 Specification", W3C Recommendation, D. Raggett, A. Le Hors, I. Jacobs, 18 December 1997, revised 24 April 1998. Available at "HTML 4.0 Specification Errata" is available at [ISO-HTML] "ISO/IEC 15445:1999 Information Technology -- Document Description and Processing Languages -- HyperText Markup Language (HTML)", R. Price, D. Abrahamson, work in progress. Available at See also: "User's Guide to ISO/IEC 15445:1999 HyperText Markup Language (HTML)", available at [SP] SP is a free, object-oriented toolkit for SGML parsing and entity management written by James Clark. Further information is available at . [WAI-WEBCONTENT] "Web Content Accessibility Guidelines", W3C Working Draft, W. Chisholm, G. Vanderheiden, I. Jacobs, work in progress. See also: "Techniques for Web Content Accessibility Guidelines" The latest version of these documents can be available from [WAI-USERAGENT] "User Agent Accessibility Guidelines", W3C Working Draft, J. Gunderson, I. Jacobs, work in progress. The latest version of this document can be available from [WAP-W3C] "WAP Forum - W3C Cooperation White Paper", W3C Note, J. Hjelm, B. Martin, P. King, 30 October 1998. Available at [WML] "Wireless Markup Language Specification", WAP Forum, 30 April 1998. Available at [WML1.1] "Wireless Markup Language Specification Version 1.1", proposed, WAP Forum, 3 February 1999. Available at [XHTML] "XHTML 1.0: The Extensible HyperText Markup Language - A Reformulation of HTML 4.0 in XML 1.0", W3C Working Draft, Steven Pemberton et al., work in progress. Available at Appendix HTML 4.0 Mobile DTD Sample SGML catalog Note. The HTML 4.0 Mobile DTD is a complete subset of the HTML 4.0 Strict DTD, and if you use the following DTD: %Mobile.dtd; then you can get the same definition as the HTML 4.0 Strict DTD, as amended by the HTML 4.0 Specification Errata. The following sample SGML catalog uses the above DTD to invoke the HTML 4.0 Strict DTD. Typically, the Mobile DTD itself will be invoked by a system identifier, so it is not included in this catalog. -- HTML 4.0 Strict DTD, as amended by the HTML 4.0 Specification Errata -- PUBLIC "-//W3C//DTD HTML 4.0//EN" html40-strict.dtd -- entity sets for HTML 4.0 -- PUBLIC "-//W3C//ENTITIES Latin1//EN//HTML" HTMLlat1.ent PUBLIC "-//W3C//ENTITIES Special//EN//HTML" HTMLspecial.ent PUBLIC "-//W3C//ENTITIES Symbols//EN//HTML" HTMLsymbol.ent SGMLDECL html40.decl DOCTYPE html html40-strict.dtd Document Type Definition ]]> ]]> ]]> ]]> ]]> ]]> %HTMLlat1; %HTMLsymbol; %HTMLspecial; ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]> ]]>