Open In App

Output:

Example 2: In this example, we will see the implementation of table cell padding with another example.

HTML




<!DOCTYPE html>
<html>
 
<head>
    <title>
        HTML table cellpadding Attribute
    </title>
</head>
 
<body>
    <h1>Company Employees</h1>
 
    <h2>
        Employee Details
    </h2>
 
    <table border="1" cellpadding="40">
        <caption>Employee Information</caption>
 
        <tr>
            <th>Employee ID</th>
            <th>Name</th>
            <th>Position</th>
        </tr>
        <tr>
            <td>001</td>
            <td>John Doe</td>
            <td>Software Engineer</td>
        </tr>
        <tr>
            <td>002</td>
            <td>Jane Smith</td>
            <td>UX Designer</td>
        </tr>
    </table>
</body>
 
</html>


Output:

Screenshot-2023-12-26-161819

Supported Browsers:



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads