welcome to tutorialfamily

html table

HTML table is define with <table> tag.

HTML row is define with <tr> tag.

HTML data is define with <td> tag.

HTML heading is define with <th> tag.

example



<!DOCTYPE html>
<html>
	<head>
		<title>
			simple table demo
		</title>
	</head>
<body>
	<table>
		<tr>
			<th> name </th>
			<th> brand </th>
			<th> address </th>
        </tr>
		<tr>
		   <td> volvo </td>
		   <td> volvo </td>
		   <td> india </td>
		</tr>
		<tr>
		   <td> verna </td>
		   <td> verna </td>
		   <td> india </td>
		</tr>
</table>
</body>
</html>


html border attribute

example



<!DOCTYPE html>
<html>
	<head>
		<title>
			border table demo
		</title>
	</head>
<body>
	<table border=”1″>
		<tr>
			<th> name </th>
			<th> brand </th>
			<th> address </th>
        </tr>
		<tr>
		   <td> volvo </td>
		   <td> volvo </td>
		   <td> india </td>
		</tr>
		<tr>
		   <td> verna </td>
		   <td> verna </td>
		   <td> india </td>
		</tr>
</table>
</body>
</html>


html border by css

example



<!DOCTYPE html>
<html>
	<head>
		<title>
			simple table demo
		</title>
                <style>
                        td,th,tr,table
                     {
                        border:1px solid #000;
                        text-align:center;
                     }
               </style>
	</head>
<body>
	<table>
		<tr>
			<th> name </th>
			<th> brand </th>
			<th> address </th>
        </tr>
		<tr>
		   <td> volvo </td>
		   <td> volvo </td>
		   <td> india </td>
		</tr>
		<tr>
		   <td> verna </td>
		   <td> verna </td>
		   <td> india </td>
		</tr>
</table>
</body>
</html>


Our Content