120 likes | 269 Views
Internet Applications Development. Lecture 6 L. Obead Alhadreti. Lecture Outline:. Inserting Tables. Tables are considered as one of the most common tools used in HTML, as most of web sites use them today in a way or another. The main tags used with tables in HTML are as follows:.
E N D
Internet Applications Development Lecture 6 L. ObeadAlhadreti
Lecture Outline: • Inserting Tables.
Tables are considered as one of the most common tools used in HTML, as most of web sites use them today in a way or another. • The main tags used with tables in HTML are as follows:
Example: <table> <tr> <td> 1 </td> <td> 2 </td> </tr> <tr> <td> 3 </td> <td> 4 </td> </tr> </table>
There is another tag used often when table is created. It is known as table headings <th> … </th>. It is an optional tag that used to define the top cells in the table. The text inside these cells should be bold. • There is also another tag used with tables: <caption> …. </caption>. It is used to define a unique title for the tables. It is inserted immediately after the start tag of the table element <table>.
الدول و العواصم • Example: <table> <caption> الدول و العواصم </caption> <tr> <th> الدولة </th> <th> العاصمة</th> </tr> <tr> <td> السعودية </td> <td> الرياض </td> </tr> </table>
Merging the cells To margin the cells, we use the colspan attribute to merge more than one columns, and rowspan to merge more than one rows. Example: <table> <tr> <td colspan=“2”>1 </td> </tr> <tr> <td> 3 </td> <td> 4 </td> </tr> </table>
Examples: <table> <tr> <td rowspan=“2”> 1 </td> <td> 2</td> </tr> <tr> <td> 4 </td> </tr> </table>
Questions ? Be active !