fredag 28 oktober 2011

td html code whit alligin

You could also use the td html code whit alligin making it look like this

<table border="1" width="100%">  <tr>    <th>Food</th>    <th>Cost</th>  </tr>  <tr>    <td width="70%">Lasange</td>    <td width="30%">$150</td>  </tr>  <tr>    <td>Pasta</td>    <td>$10</td>  </tr></table>




Which then will give

Food Cost
Lasange $150
Pasta $10

td html

When using html code you will most likely come across the td html code, its the basic code when you do tables in html

it looks like this
Food Cost
Pasta $10

And the code for it is:
<table border="1">  <tr>    <th>Food</th>    <th>Cost</th>  </tr>  <tr>    <td>Pasta</td>    <td>$10</td>  </tr></table>





The <td> tag is defining a standard cell in an HTML table.
In the  HTML table there is  two kinds of cells:


Fist the header cells, which contains the header information (the the element)
And then also the standard cells which contains data (the td elements)
The text in a th element is bold and centered.
The text in a td element is regular and left-aligned.


The td html code works in all browsers