Top Banner
Semantics & the Mobile Web France Rupert [email protected] Twitter: @SurferRoop
32

Semantics & the Mobile Web

Dec 18, 2014

Download

Technology

surferroop

Presentation at Design for Mobile 2009 Conference
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Semantics & the Mobile Web

Semantics & the Mobile Web

France [email protected]

Twitter: @SurferRoop

Page 2: Semantics & the Mobile Web

Twitter hashtag:

#des4mo

Page 3: Semantics & the Mobile Web

The good news

Good mobile web development only requires understanding of XHTML / CSS, and best practices in Web Standards-based design as they’ve been highlighted in the last handful of years

Mobile web sites are easier than ever before to build.

…not as good..? Easier said than done.

Page 4: Semantics & the Mobile Web

On with the Semanticity…

Page 5: Semantics & the Mobile Web

Semantic Markup

General definition: “The meaning of the element or property in

relation to the content which it describes”

Mine: “Content in context” or… “XHTML elements used correctly.”

Specifically: XHTML has structure-creating elements and

attributes that enrich content.

Page 6: Semantics & the Mobile Web

Enriched how?

Markup structure enriches content through assigned: Intonation Pauses Rhythm, timing Punctuation facial expressions and body language …. very likely half your message.

Page 7: Semantics & the Mobile Web

And Markup is..?

Text annotation describing how its content is to be structured, laid out, or formatted.

In our case, HTML: Hypertext Markup Language

<tag attribute="value">Lorem ipsum.</tag>

Page 8: Semantics & the Mobile Web

Semantic vs…well, bad

Page 9: Semantics & the Mobile Web

Bad HTML

PRESENTATIONAL: “this is red,” “this is Arial and is aligned center.” Inflexible, poor longevity, little reuse. Worst offenders are tools that hide markup from author.

DELIBERATE: were created specifically for presentation elements have no semantic meaning Elements: <center>, <font>, <frame>, <iframe> Attributes: align, face and size, width, height

Page 10: Semantics & the Mobile Web

Bad HTML

PRESENTATIONAL with DELIBERATE elements

<center><font face="arial" size="4">Acme Inc.</font><font color="red" size="1">Pseudo-reliable products</font>

</center>

Page 11: Semantics & the Mobile Web

Bad HTML

<table border="1" cellspacing="5" cellpadding="5"><tr>

<td width="10"><img src="bullet.gif" /></td><td width="150">Item 1</td>

</tr><tr>

<td width="10"><img src="bullet.gif" /></td><td width="150">Item 2</td>

</tr><tr>

<td width="10"><img src="bullet.gif" /></td><td width="150">Item 3</td>

</tr></table>

Page 12: Semantics & the Mobile Web

Bad HTML

<table> != layout format

PROBLEM: presentation embedded in markup Development more difficult Cumbersome and difficult to support – let alone maintain Restricts adaptability. Not optimum for repurposing for multiple

devices. Increased file size AT BEST, using tables for layout will result in poor performance

and rendering results out of left field.

SOLUTION: flexibility and lower document size achieved through CSS-based layout. Separate the layers.

Page 13: Semantics & the Mobile Web

Semantic HTML

DESCRIPTIVE: Doesn’t insist what you (browsers, actually) should

do with it; only says what it is. Open-ended, large-scale publishing enabled. Flexible and reusable.

Expresses on behalf of the document’s content.

<h1>Acme Inc.</h1><p>Pseudo-reliable products</p>

Page 14: Semantics & the Mobile Web

Semantic HTML

<ul class="menu"><li>Item

1</li><li>Item

2</li><li>Item

3</li></ul>

Page 15: Semantics & the Mobile Web

Semantic HTML

<table><tr>

<th>Product</th><th>Price</th>

</tr><tr>

<td class="product">Jet Pack</td><td class="price">$199</td>

</tr><tr>

<td class="product">Rope</td><td class="price">$19</td>

</tr></table>

Page 16: Semantics & the Mobile Web

Semantic HTML

<table> == tabular data

CHALLENGE: even for tabular data, tables are not guaranteed to work well or render accurately on some mobile browsers, especially with smaller screens.

ACCEPTABLE ALTERNATE: Definition lists, <dl>, can be used to express relationships between data values.

Page 17: Semantics & the Mobile Web

Semantic HTML

<dl><dt>Jet Pack</dt><dd>$199</dd><dt>Rope</dt><dd>$19</dd>

</dl>

Page 18: Semantics & the Mobile Web

Semantic HTML

ABUSED: elements possess semantic meaning, but used incorrectly because of their default browser rendering.

<blockquote> != indent this <h1> != big and bold <table> != let’s create some visual columns

<blockquote>Lorem ipsum dolor sit</blockquote>

Page 19: Semantics & the Mobile Web

So what to do?

Page 20: Semantics & the Mobile Web

Think different: structurally

Don’t think on how the content looks, it doesn’t matter… yet.

Not yet a layout, only a structure of content blocks with related meaning.

Describe your content by assigning the most precise HTML building block.

Once structurally sound, it’s ready to be told how to appear. Bring in your style layer.

Page 21: Semantics & the Mobile Web

Why..?

Page 22: Semantics & the Mobile Web

The spot we’re in…

Page 23: Semantics & the Mobile Web

Variety found in…

Devices

XHTML Basic

XHTML-MP

CSS or no

Colors

Tables…

Page 24: Semantics & the Mobile Web

Let’s put that aside; more pressing concerns…

Page 25: Semantics & the Mobile Web

Constraints

Connection speed

Bandwidth allotment

Battery life

CPU

Memory

Page 26: Semantics & the Mobile Web

Consider…

ASSUMPTIONS: users in a mobile context are more keen on the

information they want to view now. browsing behavior more likely to be

Information-seeking. expect an unobstructed view through well-

structured content.

Page 27: Semantics & the Mobile Web

Consider…

THEREFORE: Presentation is secondary Content and functionality are primary

Page 28: Semantics & the Mobile Web

We owe it to them.

Enable sites and its compelling contentand features to reach them

faster and still be compelling.

Page 29: Semantics & the Mobile Web

What’s the good news again?

Page 30: Semantics & the Mobile Web

The good news

Good mobile web development only requires understanding of XHTML / CSS, and best practices in Web Standards-based as they’ve been highlighted in the last handful of years

Mobile web sites are easier than every before to build.

And let me add: 5+ years worth of knowledge and resources everywhere at your disposal begging to help you.

Page 31: Semantics & the Mobile Web

The good news

Stick to these practices and the amount of worry diminishes about testing across every

possible rendering.

Design and Develop with confidence

Page 32: Semantics & the Mobile Web

– thank you

France [email protected]

Twitter: @SurferRoop