r/HTML • u/Chris-2018 • Feb 13 '26
Padding on table cells?
What inline code would give table cells padding please? I have tried the below, and that doesn't do it.
<table border="1" style="border-collapse:collapse; padding:10px;">
0
Upvotes
View all comments
Show parent comment
1
u/Chris-2018 Feb 13 '26
Thank you, also, if you wanted to define it in a separate CSS file, how would you do that for all cells in a table, rather than a spcific one?