logo CBCE Skill INDIA

Welcome to CBCE Skill INDIA. An ISO 9001:2015 Certified Autonomous Body | Best Quality Computer and Skills Training Provider Organization. Established Under Indian Trust Act 1882, Govt. of India. Identity No. - IV-190200628, and registered under NITI Aayog Govt. of India. Identity No. - WB/2023/0344555. Also registered under Ministry of Micro, Small & Medium Enterprises - MSME (Govt. of India). Registration Number - UDYAM-WB-06-0031863

What is Cellpadding?


Cellpadding

cellpadding is an attribute in HTML that is used to define the amount of space (padding) between the content of a table cell and its borders. It is typically used within the <table> element to control the spacing within individual cells.

The cellpadding attribute accepts a numerical value, which represents the number of pixels of space to be added inside each cell. This space is added on all four sides of the cell content.

 

Here's an example of how the cellpadding attribute is used:

<table cellpadding="10">
  <tr>
    <td>Cell 1</td>
    <td>Cell 2</td>
  </tr>
  <tr>
    <td>Cell 3</td>
    <td>Cell 4</td>
  </tr>
</table>

In this example, each cell in the table will have a padding of 10 pixels on all sides, creating space between the content of the cell and its borders.

 

It's worth noting that while the cellpadding attribute is still supported in modern HTML, it is considered a presentational attribute. In modern web development, styling is often handled using CSS (Cascading Style Sheets) rather than HTML attributes. Using CSS, you can achieve similar effects by applying styles to the cells or the table itself.

 

Thank you,

Popular Post:

Give us your feedback!

Your email address will not be published. Required fields are marked *
0 Comments Write Comment