# Legacy and pasted HTML to PDF

Old and pasted HTML renders as browsers show it: newsletters built from nested tables, bgcolor, align and font tags, details elements and printed forms.

A table-built newsletter with bgcolor, align and font tags, center, open and closed details, and a printed form with its controls. Toggle: html_blocks.

- PDF: https://legivel.com/examples/text-structure/legacy-html-email.pdf
- Page: https://legivel.com/examples/text-structure/legacy-html-email
- Open in the editor: https://legivel.com/markdown-to-pdf?sample=html-legacy
- More markdown text and structure in PDF: https://legivel.com/examples/text-structure

## Markdown source

```markdown
# Pasted and legacy HTML

Real HTML is often old: newsletters built from nested tables, presentational attributes, font tags. It renders the way mail clients and browsers show it.

<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#f4f4f5">
<tr><td align="center">
<table width="480" align="center" cellpadding="16" cellspacing="0" bgcolor="#ffffff" style="border:1px solid #e4e4e7">
<tr><td bgcolor="#155e75" align="center"><font color="#ffffff" size="5" face="Georgia, serif"><b>The Orchard Gazette</b></font><br><font color="#a5f3fc" size="2">Issue 42 · Autumn harvest</font></td></tr>
<tr><td align="left"><font face="Arial, sans-serif" size="3">Dear members,<br><br>The apple harvest closed at <b>214 tonnes</b>, our best in six years. Pressing starts on Monday; volunteers meet at the north barn at 07:30.</font></td></tr>
<tr><td align="center"><table align="center" cellpadding="10" cellspacing="0"><tr><td bgcolor="#f59e0b" align="center"><font color="#ffffff" face="Arial" size="3"><b>Join the pressing day</b></font></td></tr></table></td></tr>
<tr><td bgcolor="#fafafa" align="center"><font size="1" color="#71717a" face="Arial">Orchard Cooperative · 12 Mill Lane · You receive this as a member.</font></td></tr>
</table>
</td></tr>
</table>

<hr>

<center><font size="4" color="#7c2d12"><i>Centered with the old center and font tags</i></font></center>

<details open><summary><b>Delivery terms</b> (an open details element)</summary><p>Goods travel at the buyer's risk once loaded. Claims for damage reach us within seven days of delivery.</p></details>

<details><summary><b>Archive</b> (a closed details element shows only its summary)</summary><p>Hidden text.</p></details>

<form><fieldset style="border:1px solid #a1a1aa;padding:8px 12px"><legend>Return form (a printed form)</legend><label><input type="checkbox" checked> Item arrived damaged</label><br><label><input type="checkbox"> Wrong size</label><br><label>Order number <input type="text" value="NW-20931" size="12"></label> <label>Reason <select><option>Damaged in transit</option></select></label><br><textarea rows="2" cols="40">The lid was cracked on arrival.</textarea><br><button>Submit</button></fieldset></form>

Scripts, frames and event handlers never run. Encodings such as Windows-1252 and UTF-16 are decoded before parsing, and a broken byte becomes a replacement character instead of failing the document.
```
