Mai 28 2008

Die Elemente von XHTML-MP

Tag: AllgemeinMichael Schwarz @ 16:25

XHTML-MP 1.0 (MP = Mobile Profile) setzt sich zusammen aus XHTML-Basic und einigen zusätzlichen Elementen:

XHTML-Basic

Strukturelemente:
body, head, html, title

Text- & Hypertextelemente:
a, abbr, acronym, address, blockquote, br, cite, code, dfn, div, em, h1, h2, h3, h4, h5, h6, kbd, p, pre, q, samp, span, strong, var

Listenelemente:
dl, dt, dd, ol, ul, li

Formularelemente:
form, input, label, select, option, textarea

Tabellen:
caption, table, td, th, tr

Sonstige Elemente:
img, object, param, meta, link, base

Zusätzlich (zu basic), teilweise legacy:

fieldset, optgroup,
das Attribut “start” bei ol,
das Attribut “value” bei li,
b, big, hr, i, small,das Element “style”, sowie das Attribut style (style=”…”)

XHTMP-MP unterstützt also Styles, XHTML-Basic nicht.


Mai 28 2008

Grundgerüst einer XHTML-MP 1.0 Seite

Tag: AllgemeinMichael Schwarz @ 15:49

Anbei ein Beispiel für ein ganz simples Grundgerüst einer standard-konformen XHTML-MP 1.0 Seite, wie man es für eine Mobile-Website nehmen würde:

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
"http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Titel des Dokumentes</title>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
<meta http-equiv="Cache-Control" content="max-age=3000" />
<link rel="Shortcut Icon" href="/favicon.ico" type="image/x-icon" />
<style type="text/css">
* {margin: 0;padding: 0;}
body {font-family: sans-serif;}
</style>
</head>
<body>
<h1>Überschrift H1</h1>
<p>Lorem ipsum ...</p>
</body>
</html>

Das CSS könnte man auch in eine externe Datei legen und verlinken, was aber wegen des “flash of unstyled content (aka fouc)” und oft schlechtem Caching-Verhalten der Geräte nicht unbedingt enpfehlenswert ist. Stattdessen kann man den CSS Teil serverseitig als include einbauen, z.B. in PHP: <?php include('css/styles.php'); ?>. Der Pflegbarkeit wegen.


Mai 15 2008

Should this blog be in english?

Tag: AllgemeinMichael Schwarz @ 13:59

I deal especially with the german “mobile-web-design-scene”, and some things are regional. But I see alot of traffic coming to this site from all over the world. So, should I rather write in english?