-->
Showing posts with label attribute. Show all posts
Showing posts with label attribute. Show all posts

html with border color

we can apply color to border of table as shown below.
----------------------------------------------------------------------------------------------
<html> <!--called root tag-->
<head> <!--contains meta information of page-->
<title><!--contains title of page-->
understanding table tag with attribute
</title>
</head>
<body>
<!--we have using heading-->
<h1>we are going to creat table</h1>
<!--we use table tag with attribute border to change its border width. otherwise there will no border-->
<!-- we are using width to 100% and border color green-->
<table border="1" width="100%" bordercolor="green">
<!--we use tr(table data) tag to create row-->
<tr>
<!--we use tag td (table data)to create 
cell/column-->
<!--it creats three cells with respective data-->
<td>id</td>
<td>name</td>
<td>grade</td>
<!--closing of first row-->
</tr>
<!-- again we create second row-->
<tr>
<td>001</td>
<td>Rajan</td>
<td>10</td>
</tr>
<!--closing of table tag-->
</table>
</body>
</html>

 

html with table and attributes

We can apply different attributes to table.
--------------------------------------------------------------------------------------
<html> <!--called root tag-->
<head> <!--contains meta information of page-->
<title><!--contains title of page-->
understanding table tag
</title>
</head>
<body>
<!--we have using heading-->
<h1>we are going to creat table</h1>
<!--we use table tag with attribute border to change its border width. otherwise there will no border-->
<table border="1" width="100%">
<!--we use tr(table data) tag to create row-->
<tr>
<!--we use tag td (table data)to create 
cell/column-->
<!--it creats three cells with respective data-->
<td>id</td>
<td>name</td>
<td>grade</td>
<!--closing of first row-->
</tr>
<!-- again we create second row-->
<tr>
<td>001</td>
<td>Rajan</td>
<td>10</td>
</tr>
<!--closing of table tag-->
</table>
</body>
</html>