![eBook-Project by AboutWebDesign.de [LOGO]](logo.jpg)
Nach oben
<!-- Neue Tabellendefiniton-->
<!-- Erklärung der Attribute:
border: Rahmendicke
cellspacing: Abstand zwischen zwei Zellen
cellpadding: Abstand der Zellinhalte zum Zellrand
align: Ausrichtung der Tabelle
summary: Zusammenfassung der Inhalte, z.B. für Screenreader
width: Breite
height: Höhe
-->
<table border="1" cellspacing="3" cellpadding="3"
align="left" summary="viele nützliche Informationen"
width="500" height="200">
<caption>Titel der Tabelle</caption>
<!--
Vordefinition der Spalten
Verkürzt Ladezeiten, da der Browser die Tabelle nun
direkt aufbauen kann, ohne sie erst vollständig
laden zu müssen
-->
<colgroup>
<col width="300">
<col width="200">
</colgroup>
<!-- Tabellenkopf -->
<thead>
<tr>
<th>Spalte 1</th>
<th>Spalte 2</th>
<th></th>
</tr>
</thead>
<tbody>
<!-- Neue Reihe -->
<tr>
<!-- Neue Zelle -->
<!--
Attribute:
abbr: Kurzbeschreibung des Inhalts, z.B.
für Screenreader
width: Breite
height: Höhe
-->
<td abbr="Informationen über xyz" height="200" width="300">
Inhalte 1
</td>
<td abbr="Informationen über xyz">
Inhalte 2
</td>
</tr>
<!-- Neue Reihe -->
<tr>
<!-- Neue Zelle -->
<!--
Attribute:
abbr: Kurzbeschreibung des Inhalts, z.B. für Screenreader
-->
<td abbr="Informationen über xyz">
Inhalte 1
</td>
<td abbr="Informationen über xyz">
Inhalte 2
</td>
</tr>
<!-- Neue Reihe -->
<tr>
<!-- Neue Zelle -->
<!--
Attribute:
abbr: Kurzbeschreibung des Inhalts, z.B. für Screenreader
-->
<td abbr="Informationen über xyz" colspan="2">
Verbundene Zelle
</td>
</tr>
</tbody>
<!-- Tabellenfuß -->
<tfoot>
<tr>
<td>Fuß 1</td>
<td>Fuß 2</td>
</tr>
</tfoot>
</table>

Nach oben
tbody).
<html>
<head>
<title>Datenblatt</title>
<style>
body {background: white; font-family: Verdana, Arial; }
th {background: silver;}
.spalte1 {background: #dbdbdb}
.spalte2 {background: #e9e9e9}
</style>
</head>
<body>
<table>
<caption>Daten über xyz</caption>
<thead>
<tr>
<th>Name</th>
<th>Wert a</th>
<th>Prozentzahl b</th>
<th>Erwartete Steigerung</th>
<th>Vergleichswert 2000</th>
</tr>
</thead>
<tbody>
<tr class="spalte1">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td>
300
</td>
</tr>
<tr class="spalte2">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td>
300
</td>
</tr>
<tr class="spalte1">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td>
300
</td>
</tr>
<tr class="spalte2">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td>
300
</td>
</tr>
<tr class="spalte1">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td>
300
</td>
</tr>
<tr class="spalte2">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td>
300
</td>
</tr>
<tr class="spalte1">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td>
300
</td>
</tr>
<tr class="spalte2">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td>
300
</td>
</tr>
<tr class="spalte1">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td>
300
</td>
</tr>
<tr class="spalte2">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td>
300
</td>
</tr>
<tr class="spalte1">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td>
300
</td>
</tr>
<tr class="spalte2">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td>
300
</td>
</tr>
</tbody>
</table>
</body>
</html>

<html>
<head>
<title>Datenblatt</title>
<style>
body {background: white; font-family: Verdana, Arial; }
th {background: silver;}
.spalte1 {background: #dbdbdb}
.spalte2 {background: #e9e9e9}
.important {background: #ff9966}
</style>
</head>
<body>
<table>
<caption>Daten über xyz</caption>
<thead>
<tr>
<th>Name</th>
<th>Wert a</th>
<th>Prozentzahl b</th>
<th>Erwartete Steigerung</th>
<th>Vergleichswert 2000</th>
</tr>
</thead>
<tbody>
<tr class="spalte1">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td class="important">
300
</td>
</tr>
<tr class="spalte2">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td>
300
</td>
</tr>
<tr class="spalte1">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td class="important">
34%
</td>
<td>
300
</td>
</tr>
<tr class="spalte2">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td>
300
</td>
</tr>
<tr class="spalte1">
<td class="important">
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td>
300
</td>
</tr>
<tr class="spalte2">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td>
300
</td>
</tr>
<tr class="spalte1">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td>
300
</td>
</tr>
<tr class="spalte2">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td>
300
</td>
</tr>
<tr class="spalte1">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td>
300
</td>
</tr>
<tr class="spalte2">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td>
300
</td>
</tr>
<tr class="spalte1">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td>
300
</td>
</tr>
<tr class="spalte2">
<td>
xyz
</td>
<td>
200
</td>
<td>
16%
</td>
<td>
34%
</td>
<td>
300
</td>
</tr>
</tbody>
</table>
</body>
</html>

<style>
body {background: white; font-family: Verdana, Arial; }
th {background: silver;}
.spalte1 {background: #669966}
.spalte2 {background: #66cc99}
.important {background: white}
</style>
<style>
body {background: white; font-family: Verdana, Arial; }
th {background: silver;}
.spalte1 {background: #0099cc}
.spalte2 {background: #66ccff}
.important {background: #66ffff}
</style>
Nach oben
cellpadding-Attribut von HTML zu Nutze macht:
<html>
<head>
<title>Info-Kasten</title>
<style>
body {background: white; font-family: Verdana, Arial; }
.outside {background: black; width: 300px;}
.inside {background: silver}
</style>
</head>
<body>
<table class="outside">
<tr>
<td>
<table class="inside">
<tr>
<td>
Hier sind einige Informationen zum Thema. Ein wunderbarer kleiner Kasten....
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

Nach oben
<ul> und <ol> zuständig sind, bietet sich doch manchmal eine Listengestaltung mit Tabellen an. Möglicher Grund: man will möglichst einfach (d.h. ohne CSS-Verwendung) und so kompatibel wie möglich den Abstand zwischen zwei Listeneinträgen oder das Listen-Aufzählungssymbol ändern. Das folgende Beispiel zeigt eine einfache Liste mit vergrößertem Abstand und dem Bindestrich als Aufzählungssymbol:
<html>
<head>
<title>Info-Kasten</title>
<style>
body {background: white; font-family: Verdana, Arial; }
.outside {background: black; width: 300px;}
.inside {background: silver}
</style>
</head>
<body>
<table border="0" cellspacing="0" cellpadding="5">
<tr>
<td>
-
</td>
<td>
Eintrag 1
</td>
</tr>
<tr>
<td>
-
</td>
<td>
Eintrag 2
</td>
</tr>
<tr>
<td>
-
</td>
<td>
Eintrag 3
</td>
</tr>
<tr>
<td>
-
</td>
<td>
Eintrag 4
</td>
</tr>
<tr>
<td>
-
</td>
<td>
Eintrag 5
</td>
</tr>
</table>
</body>
</html>

Nach oben
colspan und rowspan werden oft verwendetborder, cellpadding und cellspacing sind auf den Wert 0 gesetzt.<img src="blind.gif" width="300" height="1" hspace="0" vspace="0" border="0" alt="">
<html>
<head>
<title>Hauptseite</title>
<style>
body {background: white; font-family: Verdana, Arial; }
.nav {background: silver; width: 150px;}
</style>
</head>
<body>
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" class="nav">
<table border="0" cellspacing="0" cellpadding="3" align="center">
<tr>
<td><a href="link1.htm">Link1</a></td>
</tr>
<tr>
<td><a href="link1.htm">Link1</a></td>
</tr>
<tr>
<td><a href="link1.htm">Link1</a></td>
</tr>
<tr>
<td><a href="link1.htm">Link1</a></td>
</tr>
</table>
</td>
<td valign="top">
<h1>Hauptseite</h1>
Wilkommen auf dieser wunderbaren Homepage....
</td>
</tr>
</table>
</body>
</html>

<html>
<head>
<title>Hauptseite</title>
<style>
body {background: white; font-family: Verdana, Arial; }
.header {background: navy; color: white;}
.nav {background: #33ccff; color: white;}
</style>
</head>
<body>
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" align="center" class="header" height="100">
<h1>Arnies Super-Homepage</h1>
</td>
</tr>
<tr>
<td valign="top" class="nav" width="150">
<table border="0" cellspacing="0" cellpadding="3" align="center">
<tr>
<td><a href="link1.htm">Link1</a></td>
</tr>
<tr>
<td><a href="link1.htm">Link1</a></td>
</tr>
<tr>
<td><a href="link1.htm">Link1</a></td>
</tr>
<tr>
<td><a href="link1.htm">Link1</a></td>
</tr>
</table>
</td>
<td valign="top">
<h3>Willkommen!</h3>
Diese Homepage ist die beste der Welt. Was ich schon immer einmal der Welt vorstellen wollte...
</td>
</tr>
</table>
</body>
</html>

Nach oben