How to Add Image in HTML Table ? Last Updated : 23 Jul, 2025 Comments Improve Suggest changes 1 Likes Like Report Adding images to an HTML table can enhance the visual appeal and functionality of your webpage. Whether it is for displaying product images in an e-commerce website or adding profile pictures in a user list, images in tables are a common requirement. In this article, we will explore two methods to add images to an HTML table i.e. using plain HTML and using HTML with inline CSS for styling. Add Image in HTML TableIn this method, we'll add images to each row of the table using the <img> tag within plain HTML. HTML <!DOCTYPE html> <html> <head> <title>Table with Images</title> <style> table { margin: auto; } </style> </head> <body> <table border="1"> <tr> <th>Image</th> <th>Name</th> <th>Email</th> </tr> <tr> <td><img src= "https://media.geeksforgeeks.org/wp-content/cdn-uploads/20190710102234/download3.png" alt="GFG Logo" width="100" height="100"> </td> <td>XYZ</td> <td>xyz@geeksforgeeks.org</td> </tr> <tr> <td><img src= "https://media.geeksforgeeks.org/wp-content/cdn-uploads/20190710102234/download3.png" alt="GFG Logo" width="100" height="100"> </td> <td>ABC</td> <td>abc@geeksforgeeks.org</td> </tr> </table> </body> </html> Output: ExplanationWe add a new column with the heading "Image" to accommodate the images.Inside each row, under the "Image" column, we insert an <img> element.The src attribute is used to specify the path of the image file.The alt attribute provides alternative text for the image if it cannot be displayed.The width and height attributes are used to set the size of the image.Add Image in HTML Table using HTML and Inline CSSIn this method, we'll add images to the table and use inline CSS to style the images for better presentation. HTML <!DOCTYPE html> <html> <head> <title>Styled Table with Images</title> <style> table { margin: auto; } </style> </head> <body> <table border="1"> <tr> <th>Image</th> <th>Name</th> <th>Email</th> </tr> <tr> <td><img src= "https://media.geeksforgeeks.org/wp-content/cdn-uploads/20190710102234/download3.png" alt="GFG Logo" style="width: 100px; height: 100px; border-radius: 50%;"> </td> <td>XYZ</td> <td>xyz@geeksforgeeks.org</td> </tr> <tr> <td><img src= "https://media.geeksforgeeks.org/wp-content/cdn-uploads/20190710102234/download3.png" alt="GFG Logo" style="width: 100px; height: 100px; border-radius: 50%;"> </td> <td>ABC</td> <td>abc@geeksforgeeks.org</td> </tr> </table> </body> </html> Output: ExplanationWe use the same basic structure as in approach 1 (Add Image in HTML Table).In addition to the width and height attributes, we use the style attribute to apply inline CSS styles to the images.The border-radius: 50%; style is used to make the images circular, which is a common design choice for profile pictures.You can add more CSS styles as needed to customize the appearance of the images. Comment V vkash8574 Follow 1 Improve V vkash8574 Follow 1 Improve Article Tags : HTML HTML-Questions Explore HTML BasicsHTML Introduction5 min readHTML Editors5 min readHTML Basics7 min readStructure & ElementsHTML Elements5 min readHTML Attributes8 min readHTML Headings4 min readHTML Paragraphs5 min readHTML Text Formatting4 min readHTML Block and Inline Elements3 min readHTML Charsets4 min readListsHTML Lists5 min readHTML Ordered Lists5 min readHTML Unordered Lists4 min readHTML Description Lists3 min readVisuals & MediaHTML Colors11 min readHTML Links Hyperlinks3 min readHTML Images7 min readHTML Favicon4 min readHTML Video4 min readLayouts & DesignsHTML Tables10 min readHTML Iframes4 min readHTML Layout4 min readHTML File Paths3 min readProjects & Advanced TopicsHTML Forms5 min readHTML5 Semantics6 min readHTML URL Encoding4 min readHTML Responsive Web Design11 min readTop 10 Projects For Beginners To Practice HTML and CSS Skills8 min readTutorial ReferencesHTML Tags - A to Z List15+ min readHTML Attributes Complete Reference8 min readHTML Global Attributes5 min readHTML5 Complete Reference8 min readHTML5 MathML Complete Reference3 min readHTML DOM Complete Reference15+ min readHTML DOM Audio/Video Complete Reference2 min readSVG Element Complete Reference5 min readSVG Attribute Complete Reference8 min readSVG Property Complete Reference7 min readHTML Canvas Complete Reference4 min read Like