We can display the images in a table using the IMG element. Now Here we create a Web page name is imagetable.html to learn how to display images in table .
<!doctyle html>
<head>
<title>
Displaying Images </title>
<style>
body
{padding:10px 50px;
font:normal 11px auto "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color:#44ff00;
background:#EE00ff;}
caption
{
padding:0 0 5px 0;
width:700px;
font:italic 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
text-align:right;
}
td
{border-right:1px solid #C1Sff1;
border-bottom:1px solid #C1DAD7;
background:#fff;
padding:6px 6px 6px 12px;
color:#4f6b72;
}
img{
height:100px;
width:100px;
}
</style>
</head>
<body>
<table>
<caption>Displaying image in the table</caption>
<tr>
<td>bike</td>
<td><img src=""></td>
</tr>
<tr>
<td>bike</td>
<td><img src="bike.jpg"></td>
</tr>
<tr>
<td>cycle</td>
<td><img src="cycle.jpg"></td>
</tr>
<!doctyle html>
<head>
<title>
Displaying Images </title>
<style>
body
{padding:10px 50px;
font:normal 11px auto "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color:#44ff00;
background:#EE00ff;}
caption
{
padding:0 0 5px 0;
width:700px;
font:italic 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
text-align:right;
}
td
{border-right:1px solid #C1Sff1;
border-bottom:1px solid #C1DAD7;
background:#fff;
padding:6px 6px 6px 12px;
color:#4f6b72;
}
img{
height:100px;
width:100px;
}
</style>
</head>
<body>
<table>
<caption>Displaying image in the table</caption>
<tr>
<td>bike</td>
<td><img src=""></td>
</tr>
<tr>
<td>bike</td>
<td><img src="bike.jpg"></td>
</tr>
<tr>
<td>car</td>
<td><img src="car.png"></td>
</tr>
<td>car</td>
<td><img src="car.png"></td>
</tr>
<td>cycle</td>
<td><img src="cycle.jpg"></td>
</tr>
</table>
</body>
</html>
The OUTPUT of the Above WEBPAGE is:
No comments:
Post a Comment