1

I have a table with many rows, and I just need to find a way to put a line of space in between each row.

  Example: a b c
 
           d e f

I'm still very new to HTML/CSS/JS, so I was hoping I could get a pretty simple explanation, as I've seen the question asked here but I was still unsure of how to replicate it. Here are my tables in HTML, and the code I used in JS. Here's my table with some JS code. Here's my table in HTML. If anyone could help me out with this, I'd really appreciate it!

I've tried to make a class for <tr> and using border-collapse, but to no avail, as I may have done something wrong. I've also tried messing around in the JS code, but I'm not sure if I should add the spaces in between from there or through the HTML.

Amdaggle
  • 31
  • 5
  • 1
    Could you just use ``? – Barmar Apr 01 '22 at 22:00
  • I just tried that, unfortunately it didn't work. – Amdaggle Apr 01 '22 at 22:22
  • It really depends on how you want this to look exactly, here's example code for cell padding and spacing between rows: https://jsfiddle.net/ufgrz06s/ (also please don't post images of code, post actual code. ideally as [mre] using the `<>` button) –  Apr 01 '22 at 22:25
  • You can add a blank line like so: . The value of colspan should be equal or greater than your number of column. Alternatively, you can apply padding to the table cell using css. See: https://stackoverflow.com/questions/339923/set-cellpadding-and-cellspacing-in-css – Yogi Apr 01 '22 at 22:34
  • I apologize for posting images, I should have read more into what I should do before posting questions. But thank you so much for the reply, that's pretty much what I wanted! – Amdaggle Apr 01 '22 at 22:39
  • I am reviewer, please don't add images of code, paste it as text instead. – Sunderam Dubey Apr 02 '22 at 01:40

1 Answers1

0

Looks like you just need a bigger space between to lines, for that you can use css.

.tableRow {
    padding-bottom: 20px;
}

Another solution would be adding an empty tr, between the one that have content.

<tr style="height: 20px">
    <td></td> <td></td>
</tr>