Difference between cellpadding and cellspacing

【Foreword】

     Student question: What is the difference between cellpadding and cellspacing? often mix up

 

【Details】

(1) First, let's look at the translation

         cellpadding table gap

         cellspacing table padding

(2) Analysis

         ①cellspacing attribute is used to specify the gap between the cells of the table. The parameter value of this property is a number that represents the number of pixels occupied by the cell gap. The distance between cellpadding cells is 0, that is, there is no gap next to each other

           For the entire table, look at the following figure for comparison:

     

         

      ②The distance between the content in the cellpadding cell and the edge of the cell is 0, which means that the content is next to the edge. is for each cell

of

          Take a look at the comparison below:  

 

 

(3) Summary

       Suggestion: If you encounter similar problems in the future, you can think of the translated Chinese first.

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326097056&siteId=291194637