Tailwind add padding in t-head and body

htmltailwind

In Tailwind CSS, you can add padding to the th and td elements of a table using the py- and px- utility classes.

The py- class adds padding to the top and bottom of an element, while the px- class adds padding to the left and right of an element. The value of the class specifies the size of the padding, in pixels.

For example, to add padding of 10 pixels to the top and bottom of the th elements, and padding of 20 pixels to the left and right of the td elements, you can use the following styles:

th {
    padding-top: 10px;
    padding-bottom: 10px;
}

td {
    padding-left: 20px;
    padding-right: 20px;
}

In Tailwind CSS, these styles can be written more concisely using the py- and px- utility classes:

th {
    @apply py-10;
}

td {
    @apply px-20;
}

You can also use the pt- and pb- classes to add padding to the top and bottom of an element, and the pl- and pr- classes to add padding to the left and right of an element.

For more information on the padding utility classes in Tailwind CSS, you can refer to the documentation: https://tailwindcss.com/docs/padding.