FISA DE LUCRU Tabele in HTML - infolectii · PDF fileFISA DE LUCRU Tabele in HTML Tag-uri...
Click here to load reader
Transcript of FISA DE LUCRU Tabele in HTML - infolectii · PDF fileFISA DE LUCRU Tabele in HTML Tag-uri...
FISA DE LUCRUTabele in HTML
Tag-uri folosite pentru a crea un tabel in HTML: <table> defineste un tabel<th> defineste header-ului unui tabel<tr> defineste un rand in tabel<td>defineste celula unui tabel
Atributul BORDER al tagului TABLE precizează grosimea chenarului care înconjoară tabela.DIMENSIUNEA TABELELOR- se precizează , prin atributul WIDTH al tagului TABLE, în mod absolut (în pixeli), sau relativ (în procente din dimensiunea ferestrei). În cazul în care nu se precizează browser-ul decide.
Exemplul 1:<html><head> <title> Tabele </title> </head> <body > <h2 align="center"> Tabele </h2> <table border="1" width=25%>
<tr> <th> fructe </th> <th> legume </th> </tr>
<tr> <td> mere </td> <td> rosii </td>
</tr><tr>
<td> pere </td> <td> ardei </td>
</tr><tr>
<td> cirese </td> <td> cartofi </td>
</tr> </table> </body> </html>
Exemplu 2Creati o pagina web care sa cuprinda urmatorul tabel:Alegeti ca dimensiunea tabelului sa reprezinte 75% din dimensiunea ferestrei, iar grosimea chenarului sa fie de 2 px.