diff --git a/src/components/slides/html-tables/advanced.astro b/src/components/slides/html-tables/advanced.astro index 7f6a689..1667058 100644 --- a/src/components/slides/html-tables/advanced.astro +++ b/src/components/slides/html-tables/advanced.astro @@ -8,4 +8,125 @@ Neben table,tr und td, gibt es auch Tags um eine Tabelle etwas besser zu strukturieren

+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
ArtikelPreisMenge
Summe7,97€
Honig1,99€2
Butter3,99€1
+
+ +
+

+      <table>
+        <thead>
+          <tr>
+            <th>Artikel</th>
+            <th>Preis</th>
+            <th>Menge</th>
+          </tr>
+        </thead>
+        <tfoot>
+          <tr>
+            <td colspan="2">Summe</td>
+            <td>7,97€</td>
+          </tr>
+        </tfoot>
+        <tbody>
+          <tr>
+            <td>Honig</td>
+            <td>1,99€</td>
+            <td>2</td>
+          </tr>
+          <tr>
+            <td>Butter</td>
+            <td>3,99€</td>
+            <td>1</td>
+          </tr>
+        </tbody>
+      </table>
+    
+
+ +
+

Zeilen-Header

+

Natürlich ist es auch möglich, eine bestimmte Zelle als "Header" zu deklarieren

+

In solchen Situationen empfiehlt es sich, auch das attribut scope auf "row" zu setzen.

+
+ +
+

+      <table>
+        <tr>
+          <th>Film</th>
+          <th>Bewertung</th>
+        </tr>
+        <tr>
+          <th scope="row">Matrix</th>
+          <td>★★★★★</td>
+        </tr>
+        <tr>
+          <th scope="row">Matrix Revolution</th>
+          <td>★★★</td>
+        </tr>
+      </table>  
+    
+
+ +
+ + + + + + + + + + + + + +
FilmBewertung
Matrix★★★★★
Matrix Revolution★★★
+
+ +
+

Das scope Attribut hilft Screenreadern.

+
+ +
+

Zu guter letzt:

+

Es können Tabellen in Tabellen geschachtelt werden

+
\ No newline at end of file diff --git a/src/components/slides/html-tables/basics.astro b/src/components/slides/html-tables/basics.astro index 25e8574..acc7b84 100644 --- a/src/components/slides/html-tables/basics.astro +++ b/src/components/slides/html-tables/basics.astro @@ -94,6 +94,7 @@

Man kann auch Zellen zusammenfassen

Mithilfe des colspan-Attributes kann man festlegen, wie viele Spalten die Zelle einnehmen soll

+

Der gleiche Effekt kann für Zeilen mittels rowspan erreicht werden.

diff --git a/src/pages/tasks/html-4/index.astro b/src/pages/tasks/html-4/index.astro new file mode 100644 index 0000000..e69de29 diff --git a/src/pages/tasks/html-4/solution/index.html b/src/pages/tasks/html-4/solution/index.html new file mode 100644 index 0000000..73067f0 --- /dev/null +++ b/src/pages/tasks/html-4/solution/index.html @@ -0,0 +1,56 @@ + + + + + + Eine Liste von Spielen mit Metacritic-Bewertung + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HerstellerNameBewertung
Bandai NamcoDark Souls89
Dark Souls 291
Dark Souls 389
Elden Ring96
Larian GamesBaldur's Gate 396
Electronic ArtsDark Space (Remake)89
Dead Space 290
Dead Space 378
+ + \ No newline at end of file