TechShizz | XHTML | Tables

XHTML | Tables

Here are examples of how we can use tables in XHTML

<table border="1px">
		<tr>
			<td>Row 1 Cell 1</td>
			<td>Row 1 Cell 2</td>
		</tr>
		<tr>
			<td>Row 2 Cell 1</td>
			<td>Row 2 Cell 2</td>
		</tr>
		<tr>
			<td>Row 3 Cell 1</td>
			<td>Row 3 Cell 2</td>
		</tr>
</table>

<table border="1px">
		<tr>
			<td><b>Cars</b></td>
			<td><b>Fruits</b></td>
		</tr>
		<tr>
			<td>Ferrari</td>
			<td>Banana</td>
		</tr>
		<tr>
			<td>Mercedes</td>
			<td>Oranges</td>
		</tr>
</table>

<table border="1px">
		<tr>
			<td><b>Cars</b></td>
			<td><b>Fruits</b></td>
		</tr>
		<tr>
			<td>Ferrari</td>
			<td rowspan="2">it works!</td>
		</tr>
		<tr>
			<td>Mercedes</td>
		</tr>
</table>

<table border="1px" cellpadding="25px">
		<tr>
			<td><b>Cars</b></td>
			<td><b>Fruits</b></td>
		</tr>
		<tr>
			<td>Ferrari</td>
			<td rowspan="2">it works!</td>
		</tr>
		<tr>
			<td>Mercedes</td>
		</tr>
</table>

<table border="1px" cellspacing="20px">
		<tr>
			<td><b>Cars</b></td>
			<td><b>Fruits</b></td>
		</tr>
		<tr>
			<td>Ferrari</td>
			<td rowspan="2">it works!</td>
		</tr>
		<tr>
			<td>Mercedes</td>
		</tr>
</table>

 


Results


Add comment