Sunday, March 28, 2010
Tables
HTML tables are very basic, but can be very powerful when used correctly. At their
base level, tables can organize data into rows and columns. At their highest level,
tables can provide complicated page design—much like a page in a magazine or
newspaper, providing columns for text and sections for graphics, menus, and
so on.
Tables have three basic elements and, hence, three basic tags:
1) The table definition itself is defined and delimited by <table> tags.
2) Rows of data are defined and delimited by <tr> (table row) tags.
3) Table cells (individual pieces of data) are defined and delimited by <td>
(table data) tags. Table cells, when stacked in even rows, create table
columns.
For example, consider the following code, which results in the output shown in
Figure..
<html>
<body>
<table border-"1">
<tr><td>Name</td><td>Age</td></tr>
<tr><td>Angela</td><td>35</td></tr>
<tr><td>Branden</td><td>29</td></tr>
<tr><td>Doug</td><td>23</td></tr>
<tr><td>Ian</td><td>31</td></tr>
<tr><td>Jeff</td><td>34</td></tr>
<tr><td>John</td><td>33</td></tr>
<tr><td>Keith</td><td>39</td></tr>
<tr><td>Michael</td><td>25</td></tr>
<tr><td>Steve</td><td>38</td></tr>
<tr><td>Steven</td><td>40</td></tr>
</table>
</body>
</html>



Currently have 0 comments: