W3C Mobile Web Initiative

Introduction to W3C Mobile Web Best Practices


Dominique Hazaël-Massieux <dom@w3.org>
W3C Mobile Web Initiative

http://www.w3.org/2009/Talks/mwi-cambridge/session3.html

Cambridge, 14 October 2009

EU FP7 Logo
Supported by MobiWeb2.0, funded by European Union's FP7.

Outline

Reminder: Challenges

Example…

Beethoven's page (tinyurl.com/2ypphd)

Beethoven - good - desktop

From your mobile: follow links from bit.ly/mwbps3

…on a phone

Beethoven's page (tinyurl.com/2ypphd)

Beethoven page seen on a phone: double scrolling, prominent navigationBeethoven page: 74 Ko worth of data, mosly due to images

Let's fix it!

redesigned Beethoven's page (tinyurl.com/yq7z9m)

Beethoven page after adapting it to a phoneredesigned Beethoven page: 12 Ko worth of data

Mobile-friendly layout

Avoid:

instead

Mobile-friendly layout

In practice:

Mobile-friendly layout

Applying to Beethoven's page

resulting page (tinyurl.com/cjqk3h)

Mobile-optimized navigation

Long navigation bar at the top:

instead

Mobile-optimized navigation

Applying to Beethoven's page

resulting page (tinyurl.com/cgg786)

Dealing with images

Take care with

Dealing with images

In practice:

Dealing with images

Applying to Beethoven's page

resulting page (tinyurl.com/yzbqfv2)

Large and small screens together

Content adaptation on the server or on the client

Content Adaptation

Large and small screens together

On the client: CSS Media Types

<link rel="stylesheet" media="handheld" href="mobile.css" />
<link rel="stylesheet" media="screen" href="computer.css" />

Applicable also as:

<style type='text/css' media="handheld">

and inside a style sheet with:

@media handheld { /* mobile-specific rules */ }

Large and small screens together

On the client: CSS Media Types

Large and small screens together

Applying to Beethoven's page

resulting page (tinyurl.com/yq7z9m)

In summary