This is an archive of an inactive wiki and cannot be modified.

Keeping It Simples

This technique gives a possible implementation for a number of the Best Practices.

One way to ensure wide compatibility and usefulness on mobile devices is to keep it simple. Rather than relying on scripting, plugins, and complex styling, use simple XHTML. This helps to ensure your content will work everywhere - on mobile devices, desktops, web-enabled TV, and so on. This will help eaasily meet CategoryBpThematicConsistency

Use HTML for


Including identifying headings, lists, paragraphs, and other meaningful sections of a text document (see also CategoryBpStructure)

This is a basic feature of HTML. Techniques like using javascript to create new windows are often unreliable, and should be avoided.
Access keys in HTML

The accesskey attribute in HTML is more reliable than alternative methods such as javascript-based methods to provide quick navigation through shortcut keys (although it also has implementation limitations - see AccessKeys)

Do not use javascript to

generate text content
This is better done in HTML
make links
These should be done using plain HTML
redirect pages

This should be done via server-based redirections (see also CategoryBpUris) or plain links in most cases

Do not use tables for

Visual formatting effects
Many formatting effects can be achieved with CSS1. Others are simply not suitable for all devices, and should in general be avoided
"image slicing"
it can reduce bandwith consumption, but because table layout is unreliable on mobile devices, it requires complex fallbacks to avoid messing up layout

Code sample 1

Something like this:

<html xmlns="">
<head><title>Do This</title></head>
<h1>Simple page</h1>
<p>Welcome to my simple example with <a href="theOtherPage">one link</a></h1>

Is a simpler, more reliable, page than an equivalent reliant on scripting:

<head><title>Do Not Do This</title>
<script src="gotoPage.js">
  document.write('<h1>Simple page</h1>');
<p>Welcome to my simple example with <a href="#" onclick="javascript:gotoPage('theOtherPage')">one link</a></h1>


Contributions to this wiki are governed by the W3C policies for Contribution to W3C' wiki on Mobile Web.