p inside td
See original GitHub issueHi,
I’m having a styling problem with the following html. Can you please help me figure this out?
<table border="1">
<tr>
<td>
<p><p> </p></p><p>BEN VE AİLEM</p><p><p> </p></p><p><span style="color: rgb(91, 155, 213);">ICH UND MEINE FAMILIE</span></p><p><p> </p></p><p><span style="color: rgb(91, 155, 213);"> </span></p><p><p> </p></p><p>Tanışma</p><p><p> </p></p><p><span style="color: rgb(91, 155, 213);">Kennenlernen</span></p><p><p> </p></p><p><span style="color: rgb(84, 141, 212);"> </span></p>
</td>
</tr>
</table>
The problem also exists in the playground.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Is it good to put <p> inside <td> to put content text?
Leave out the <p> tag unless the content of your table cell is truly a paragraph. It's certainly possible to have paragraphs in...
Read more >Problem: p tag inside table tag - HTML & CSS - SitePoint Forums
I m facing a problem I put p tag inside table tag and tr,td tag inside p tag. When I see output in...
Read more >How to use an HTML tag inside HTML table? - Tutorialspoint
We can easily add HTML tag inside a table. The HTML tag should be placed inside the <td> tag. For example, adding a...
Read more ><td>: The Table Data Cell element - HTML - MDN Web Docs
The HTML element defines a cell of a table that contains data. It participates in the table model.
Read more >HTML : Is it good to put p inside td to put content text? - YouTube
HTML : Is it good to put p inside td to put content text? 5 views 11 months ago.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok. I’ll review it later this week or sometime next week.
It looks like the issue is related to PDFMake and not to my library. Inside cells, we have to use
\n
to have the texte on several lines (based on PDFMake website).So, I guess you’re stuck with using
<br>
. You can inject<br>
after your</p>
in your HTML code. For example:It will return (using your last example):
And, once translated by
html-to-pdfmake
: