• Non ci sono risultati.

Tabelle HTML

N/A
N/A
Protected

Academic year: 2021

Condividi "Tabelle HTML"

Copied!
11
0
0

Testo completo

(1)

HTML

Tabelle

(2)

<table>, <tr>, <th> e <td>

<table>

<tr>

<th> Anno </th> <th> Vendite </th>

</tr>

<tr>

<td> 2008 </td> <td> 18M </td>

</tr>

<tr>

<td> 2009 </td> <td> 25M </td>

</tr>

</table>

<table> racchiude la tabella

<tr> racchiude ciascuna riga della tabella

<th> racchiude l’ intestazione

<td> racchiude il dato

(3)

Tabelle e layout

Le tabelle servono per dati strutturati ma non solo ...

Le tabelle senza bordo sono tuttora uno strumento molto usato (anche abusato) per disporre gli oggetti nella pagina.

Preferire, quando possibile, layout

basato su Cascading Style Sheets (CSS).

(4)

<thead>, <tbody> e <tfoot>

<table>

<thead>

<tr> <th> Anno </th> <th> Vendite </th> </tr>

</thead>

<tbody>

<tr> <td> 2008 </td> <td> 18M </td> </tr>

<tr> <td> 2009 </td> <td> 25M </td> </tr>

</tbody>

<tfoot>

<tr> <td> Sum </td> <td> 43M </td> </tr>

</tfoot>

</table>

<thead> racchiude l’intestazione

<tbody> racchiude il corpo

<tfoot> racchiude la sintesi del contenuto

(5)

Celle su più colonne/righe

L’attributo

colspan = "n"

di una cella dice che quella cella si estende per n colonne.

L’attributo

rowspan = "n"

di una cella dice che quella cella si estende

per n righe.

(6)

<table>

<thead>

<tr>

<th colspan="2" > X </th>

<th rowspan="2" s> Y <br> Z </th>

</tr>

<tr> <th>h1</th> <th>h2</th> </tr>

</thead>

<tbody>

<tr> <td>1.9</td> <td>0.3</td> <td>40%</td> </tr>

<tr> <td>1.7</td> <td>0.2</td> <td>43%</td> </tr>

</tbody>

</table>

Esempio

(7)

Bordi

larghezza: border-width

style = “border-width: 10pt;”

stile: border-style

style = “border-style: solid;”

colore: border-color

style = “border-color: red;”

Forma abbreviata: border

style = “border: 10pt solid red;

(https://www.w3schools.com/css/css_border.asp)

(8)

<table style="border: 1pt solid black;">

<thead>

<tr>

<th colspan="2" style="border: 1pt solid black;"> X </th>

<th rowspan="2" style="border: 1pt solid black;"> Y <br> Z </th>

</tr>

<tr> <th>h1</th> <th>h2</th> </tr>

</thead>

<tbody>

<tr> <td>1.9</td> <td>0.3</td> <td>40%</td> </tr>

<tr> <td>1.7</td> <td>0.2</td> <td>43%</td> </tr>

</tbody>

</table>

Esempio

(9)

Allineare il contenuto di un elemento

orizzontale: text-align

style = “text-align: center;”

valori: center, left, right, justify

(https://www.w3schools.com/cssref/pr_text_text-align.asp)

verticale: vertical-align

style = “vertical-align: top;”

valori: top, bottom, middle, …

(https://www.w3schools.com/cssref/pr_pos_vertical-align.asp)

(10)

testo: color

style = “color: red;”

(https://www.w3schools.com/cssref/pr_text_color.asp)

sfondo: background-color

style = “background-color: blue;”

(https://www.w3schools.com/cssref/pr_background-color.asp)

testo e sfondo:

style = “color:red; background-color: blue;”

Colori

(11)

Dimensioni

larghezza: width

style = “width: 100pt;”

(https://www.w3schools.com/cssref/pr_dim_width.asp)

altezza: height

style = “height: 100pt;”

(https://www.w3schools.com/cssref/pr_dim_height.asp)

Riferimenti

Documenti correlati

Branch, Ann P., 2002, The Impact of the European Union on the Trade Union Movement, in Richard Balme and Didier Chabanet eds., L’action collective en Europe, Paris, Presses de

Given the central place of the distinction between procedural and substantive in the development of the English courts’ jurisprudence on legitimate expectations, it

In 2014 China became also a net foreign investor, after years of being one of the leading recipients of FDI. The country is an international lender and perhaps the only one

Nonostante il Giappone sia stato solitamente visto e descritto come un paese che rifugge il contrasto e cerca di evitare le controversie (o la loro risoluzione

The estimates from the model of large long-run trade gains from regulatory harmonization, significantly larger than from tariff reductions, therefore may be more delayed

Essays on Reason and Politics, Cambridge: MIT Press Boyd, Richard 1999, The Unsteady and Precarious Constitution of Individuals, 61 Reviewof Politics, 465-491 Bronckers, Mario

While under the EU Blue Card only the very highly qualified receive permanent work and residence permits upon arrival in Germany, all other Blue Card holders receive a

Corso di Laurea Magistrale in Marketing e Comunicazione.. (ordinamento ex