I want to write several object attributes in a singular table tab each on a new line
here\'s my pug table code excerpt
table#posts(s
Add a <br />
tag
table#posts(style="float:right; border: 1px solid green")
tbody
each post in data
tr
td(style="border: 1px solid green")
| Name: #{post.firstname + ' ' + post.lastname}
br
| Date of Birth: #{post.dob}
td(style="border: 1px solid green") buttons
else
tr
td No posts!
You can also enclose name and date of birth text within a <p>
tag
Put the text on a new line with a preceding |
:
table#posts(style="float:right; border: 1px solid green")
tbody
each post in data
tr
td(style="border: 1px solid green")
| 'Name: ' + post.firstname + ' ' + post.lastname
br
| 'Date of Birth: ' + post.dob
td(style="border: 1px solid green") buttons
else
tr
td No posts!