Startseite | Gästebuch | Kontakt

 
xx HTML-Einführung | xx CSS-Einführung | xx JavaScript-Einführung
 

6.2. Tabellenabstand

Der Abstand des Textes zur Rahmenlinie wird in Pixel mit dem Attribut cellpadding im <table>-Tag angegeben.

<html>
<head>
  <title>Tabellen</title>
</head>
<body>
  <table width="300" border="1" cellpadding="20">
    <tr>
      <td>Zelle 1</td>
      <td>Zelle 2</td>
      <td>Zelle 3</td>
    </tr>
    <tr>
      <td>Zelle 4</td>
      <td>Zelle 5</td>
      <td>Zelle 6</td>
    </tr>
  </table>
</body>
</html>
» Beispiel ansehen «

 

Die Dicke der Gitternetzlinien wird in Pixel mit dem Attribut cellspacing im <table>-Tag angegeben.

<html>
<head>
  <title>Tabellen</title>
</head>
<body>
  <table width="300" border="2" cellspacing="10">
    <tr>
      <td>Zelle 1</td>
      <td>Zelle 2</td>
      <td>Zelle 3</td>
    </tr>
    <tr>
      <td>Zelle 4</td>
      <td>Zelle 5</td>
      <td>Zelle 6</td>
    </tr>
  </table>
</body>
</html>
» Beispiel ansehen «

» zurück «» Seitenanfang «» weiter «