Apply a pad to the table head

Is there any way that I can set for only a single part of the table?

+4
source share
2 answers
table th { padding:15px; } 
+2
source
 <table> <tr> <th>Firstname</th> <th>Lastname</th> <th>Savings</th> </tr> <tr> <td>Jhon</td> <td>Smith</td> <td>$200</td> </tr> </table> <style> table, td, th { border : 1px solid black; } th { padding : 13px; } td { padding : 15px; } </style> 
+1
source

Source: https://habr.com/ru/post/1332068/


All Articles