HTML Image, table & list with full code are described below.
Introduction -
To add image in HTML we use <img> - - - - - </img> tag in html & you can resize your image with height & width.
<img src="Location your image or image name>
<img src> = Image Source
A complete code of image
<html>
<head>
<title>
Add image in HTML
</title>
</head>
<body>
<h2> <center>In this program I will add a image.</center></h2>
<img src="/storage/emulated/0/Download/chrome_screenshot_1647356786093-removebg-preview.png" height=150 width=350>
</body>
</html>
output of this code is-
Table in HTML
In HTML to draw a table we use following tags-
1. <table>-------</table> - Table tag
2. <tr>-------</tr> = Table Row
3. <th>-------</th> = Table head
4. <td>-------</td> = Table Data
Now we draw a table using following tags which are described above.
Program to draw a table in HTML
<html>
<head>
<title>
Table in HTML
</title>
</head>
<body>
<h2> <center> Program for table in HTML</center></h2>
<table border=1px cellspacing =5 Cellpadding=5>
<tr>
<th> First Column </th>
<th> Second Column </th>
<th> Third Column </th>
</tr>
<tr>
<td> 1 </td>
<td> 2 </td>
<td> 3 </td>
</tr>
<tr>
<td> 11 </td>
<td> 22 </td>
<td> 33 </td>
</tr>
<tr>
<td> 111 </td>
<td> 222 </td>
<td> 333 </td>
</tr>
</table>
</body>
</html>
Output of this code is-
List in HTML
List in html are two types
1. Ordered List
2. Unordered List
In ordered list we use numbers, & Unordered list we use symbols. To draw list in html we used following tag
<li>-------</li> = List Item
<ol>------</ol> = Ordered List
<ul>------</ul> = Unordered List
Format of list in html
<ul>
<li> First list with Unordered. </li>
<li> Second list with Unordered. </li>
<li> Third list with Unordered. </li>
</ul>
<ol>
<li> First list with ordered. </li>
<li> Second list with ordered. </li>
<li> Third list with ordered. </li>
</ol>
Complete code with List
<html>
<head>
<title>
List in HTML
</title>
</head>
<body>
<h2> Ordered & Unordered List in HTML </h2>
<ul>
<li> First list with Unordered. </li>
<li> Second list with Unordered. </li>
<li> Third list with Unordered. </li>
</ul>
<h2> ordered List in HTML </h2>
<ol>
<li> First list with ordered. </li>
<li> Second list with ordered. </li>
<li> Third list with ordered. </li>
</ol>
</body>
</html>
Output of this code is -
I hope you will clearly understood that how to add image in HTML & how to create a list & table in HTML. If you have any question you can ask me in comment.
0 Comments