TIME NOW
World current time now,
CALENDAR
Calendar monthly, yearly
login GOLD PRICE, RATE
login HOROSCOPE
login DICTIONARIES, LISTS
login SCIENCE EDUCATION RELIGION
login FINANCE, BUSINESS
login WORLD COUNTRIES, WIKI

HTML code examples, samples, tutorial

Previous articlePage bottomNext article  ALL TOPICS

Html code example. TABLE TD TR tag

 
<table</table>, <td></td>, <tr></tr> TAGS
<table>
<tr><td>Table text</td></tr>
</table>

 

<table border = "1" bordercolor = "red" >
<tr><td>Table text</td></tr>
</table>

 

<table border = "1" bordercolor = "red" >
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
</table>

 

<table border = "1" cellspacing = "5" >
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
</table>

 

<table border = "1" cellspacing = "0" >
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
</table>

 

<table border = "1" cellpadding = "5" >
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
</table>

 

<table border = "1" cellpadding = "0" >
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
</table>


With errors:

<table border = "1">
<td>Table text 1<td><td>Table text 2<td><tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
</table>


Alignment:

<table border = "1" align = "center" >
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
</table>

<table border = "1" align = "right" >
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
</table>

<table border = "1" align = "left" >
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
</table>


Width:

<table border = "1" width = "90%" >
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
</table>
<table border = "1" width = "900" >
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
</table>
<table border = "1" width = "90%" align = "center" >
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
</table>
<table border = "1" width = "700" align = "center" >
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
<tr><td>Table text 1</td><td>Table text 2</td></tr>
</table>


Rows, cells properties:

<table border = "1" width = "600" >
<tr align = "center" >
<td>Table text 1</td><td>Table text 2</td>
</tr>
<tr>
<td>Table text 1</td><td align = "center" >Table text 2</td>
</tr>
<tr>
<td align = "right" >Table text 1</td><td>Table text 2</td>
</tr>
</table>

<table border = "1" width = "600" >
<tr>
<td bgcolor = "red" >Table text 1</td>
<td bgcolor = "white" >Table text 2</td>
</tr>
<tr>
<td bgcolor = "blue" >Table text 1</td>
<td bgcolor = "green" >Table text 2</td>
</tr>
</table>

Task:
To make different colors 3rd row.

Learn properties for cells:
colspan
rowspan

www.w3schools.com
HTML Attributes
HTML Headings
HTML Paragraphs
HTML Formatting
HTML Tables

 
Previous articlePage topNext article  ALL TOPICS



 Use username: Guest, Anonymous, Programmer






QUOTES:
They think they can make fuel from horse manure.... Now, I don't know if your car will be able to get 30 miles to the gallon, but it's sure gonna put a stop to siphoning.
Billie Holliday
I love fools experiments. I am always making them.
Charles Darwin
If you think nobody cares if you're alive, try missing a couple of car payments.
Flip Wilson