How to add image inside table cell in HTML
In this article, you will look at how to add images inside a table cell in HTML.
Add image inside table cell
Name | Location | Photo |
---|---|---|
Apu Gorai | India |
Try it Yourself »
table border="4"> /table>
table border="4"> tr>/tr> tr>/tr> /table>
table border="4"> tr> th>Name/th> th>Location/th> th>Image/th> /tr> tr>/tr> /table>
table border="4"> tr> th>Name/th> th>Location/th> th>Photo/th> /tr> tr> td>Apu Gorai/td> td>India/td> td>img src="https://app.3schools.in/logo.png" height="100" width="100">/td> /tr> /table>
Click on the Try it Yourself » button to see the output of the code.
All code together
table border="4"> tr> th>Name/th> th>Location/th> th>Photo/th> /tr> tr> td>Apu Gorai/td> td>India/td> td>img src="https://app.3schools.in/logo.png" height="100" width="100">/td> /tr> /table>
In below example, you can find a responsive HTML table and inside the table cell, there is an image. Click on the Try it Yourself » button to look at the table.
Conclusion
In this article, you have learned how to add an image inside a table cell in HTML. We may use an online table generator to create a table dynamically.