0

In HTML5, as now the cellpadding is not allowed in the table tag, is there a way I can use the style attribute in table tag only and define the cellpadding.

I don't want to use style css like this:

<style>.honey th,.honey td {
    border: 1px solid black;
    padding: 10px;
}</style>

and don't want to add style attribute in each th and td:

<td style="padding:10px">January</td><td style="padding:10px">$100</td>
Jason Aller
  • 3,541
  • 28
  • 38
  • 38
  • What is the reason that makes you not want to use option 1? – AndrewL64 May 01 '18 at 22:09
  • there are more than 1 tables defined in the page with different paddings. I dont want to insert lot of style tags with different paddings. So was looking if somehow I can define it in the tag.
    – Honey Gupta May 01 '18 at 22:14
  • Check this: https://stackoverflow.com/questions/6048913/in-html5-with-respect-to-tables-what-replaces-cellpadding-cellspacing-valign – Fabio_MO May 02 '18 at 09:26

0 Answers0