Playground
Write HTML and CSS and see the PDF Fagus makes of it, updated as you type. A check in your browser points out what Fagus does not support, why, and what to do instead.
Your document is sent to this server to be rendered and is not stored. Privacy policy
Example
Invoice
- InvoiceRunning header and footer, page X of Y, repeated table header, carry-over rows
- DIN 5008 letterGerman business letter, form B, with fold marks
- Report with flex and gridKPI grid, SVG chart, flex bars, multi-column notes
- Table of contentstarget-counter(), leader() and named strings
- Tailwind invoiceUtility classes, compiled on the server
- Things Fagus does not doTriggers the compatibility check
Not rendered yet
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Invoice 2026-0142</title>
<style>
@page {
size: A4;
margin: 34mm 18mm 24mm 20mm;
@top-center { content: element(letterhead); }
@bottom-left {
content: "Northwind Studio GmbH · Invoice 2026-0142";
font: 8pt sans-serif;
color: #6b7280;
}
@bottom-right {
content: "Page " counter(page) " of " counter(pages);
font: 8pt sans-serif;
color: #6b7280;
}
}
body { margin: 0; font: 9.5pt/1.45 sans-serif; color: #1f2937; }
/* Repeated at the top of every page (a running element). */
.letterhead {
position: running(letterhead);
display: flex;
justify-content: space-between;
align-items: end;
width: 100%;
padding-bottom: 3mm;
border-bottom: 1.5pt solid #2f7017;
font-size: 8pt;
color: #4b5563;
}
.letterhead strong { font-size: 13pt; color: #1b2822; letter-spacing: -0.01em; }
.addresses { display: grid; grid-template-columns: 1fr auto; gap: 10mm; margin-bottom: 10mm; }
.sender { font-size: 7pt; color: #6b7280; border-bottom: 0.5pt solid #d1d5db; margin-bottom: 2mm; }
.meta { display: grid; grid-template-columns: auto auto; gap: 1mm 6mm; align-content: start; }
.meta dt { color: #6b7280; }
.meta dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
h1 { font-size: 18pt; margin: 0 0 2mm; color: #1b2822; }
.intro { margin: 0 0 6mm; color: #4b5563; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; font-size: 8pt; text-transform: uppercase; letter-spacing: 0.04em; color: #4b5563; }
th, td { padding: 2mm 1.5mm; border-bottom: 0.5pt solid #e5e7eb; vertical-align: top; }
thead th { border-bottom: 1pt solid #1b2822; }
tbody tr { break-inside: avoid; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Carry-over rows: shown only where the table breaks (a Fagus extension). */
.lines tbody tr { string-set: carried attr(data-carried); }
.carry { -fagus-repeat: at-break; }
.carry td { background: #f3f7ef; font-style: italic; color: #4b5563; }
.carry .amount::after { content: string(carried); }
.carry .continued::after { content: "Carried forward to page " counter(-fagus-next-page); }
.carry .forward::after { content: "Brought forward from page " counter(-fagus-previous-page); }
@supports not (-fagus-repeat: at-break) { .carry { display: none; } }
.totals { width: 70mm; margin: 6mm 0 0 auto; break-inside: avoid; }
.totals td { border: 0; padding: 1mm 1.5mm; }
.totals .grand td { border-top: 1pt solid #1b2822; font-weight: 700; font-size: 11pt; padding-top: 2mm; }
.terms { margin-top: 10mm; padding: 4mm 5mm; background: #f5f8f2; border-radius: 2mm; break-inside: avoid; }
.terms p { margin: 0 0 1.5mm; }
</style>
</head>
<body>
<header class="letterhead">
<strong>Northwind Studio</strong>
<span>Hauptstraße 12 · 10115 Berlin · [email protected]</span>
</header>
<section class="addresses">
<div>
<div class="sender">Northwind Studio GmbH · Hauptstraße 12 · 10115 Berlin</div>
Juniper Outdoor Ltd.<br>
Attn. Accounts Payable<br>
44 Harbour Road<br>
Bristol BS1 5TY<br>
United Kingdom
</div>
<dl class="meta">
<dt>Invoice</dt><dd>2026-0142</dd>
<dt>Date</dt><dd>16 Nov 2026</dd>
<dt>Due</dt><dd>30 Nov 2026</dd>
<dt>Customer</dt><dd>C-1048</dd>
</dl>
</section>
<h1>Invoice</h1>
<p class="intro">Design and development of the Juniper online shop, October 2026. Prices in EUR.</p>
<table class="lines">
<thead>
<tr><th>#</th><th>Description</th><th class="num">Qty</th><th class="num">Price</th><th class="num">Amount</th></tr>
<tr class="carry"><td colspan="4" class="forward"></td><td class="num amount"></td></tr>
</thead>
<tfoot>
<tr class="carry"><td colspan="4" class="continued"></td><td class="num amount"></td></tr>
</tfoot>
<tbody>
<tr data-carried="980.00"><td>1</td><td>Discovery workshop (half day)</td><td class="num">1</td><td class="num">980.00</td><td class="num">980.00</td></tr>
<tr data-carried="2,120.00"><td>2</td><td>Information architecture</td><td class="num">12</td><td class="num">95.00</td><td class="num">1,140.00</td></tr>
<tr data-carried="3,640.00"><td>3</td><td>Wireframes, checkout flow</td><td class="num">16</td><td class="num">95.00</td><td class="num">1,520.00</td></tr>
<tr data-carried="4,520.00"><td>4</td><td>Design system: colour and type tokens</td><td class="num">8</td><td class="num">110.00</td><td class="num">880.00</td></tr>
<tr data-carried="7,160.00"><td>5</td><td>Design system: components</td><td class="num">24</td><td class="num">110.00</td><td class="num">2,640.00</td></tr>
<tr data-carried="8,260.00"><td>6</td><td>Invoice template (HTML and CSS)</td><td class="num">10</td><td class="num">110.00</td><td class="num">1,100.00</td></tr>
<tr data-carried="8,980.00"><td>7</td><td>Accessibility review (WCAG 2.2 AA)</td><td class="num">6</td><td class="num">120.00</td><td class="num">720.00</td></tr>
<tr data-carried="10,430.00"><td>8</td><td>Usability test, five sessions</td><td class="num">1</td><td class="num">1,450.00</td><td class="num">1,450.00</td></tr>
<tr data-carried="11,760.00"><td>9</td><td>Prototype iterations</td><td class="num">14</td><td class="num">95.00</td><td class="num">1,330.00</td></tr>
<tr data-carried="12,525.00"><td>10</td><td>Copywriting, product pages</td><td class="num">9</td><td class="num">85.00</td><td class="num">765.00</td></tr>
<tr data-carried="13,725.00"><td>11</td><td>Illustrations, set of six</td><td class="num">1</td><td class="num">1,200.00</td><td class="num">1,200.00</td></tr>
<tr data-carried="14,585.00"><td>12</td><td>Icon set, 48 icons</td><td class="num">1</td><td class="num">860.00</td><td class="num">860.00</td></tr>
<tr data-carried="16,475.00"><td>13</td><td>Frontend: product listing</td><td class="num">18</td><td class="num">105.00</td><td class="num">1,890.00</td></tr>
<tr data-carried="18,050.00"><td>14</td><td>Frontend: product detail</td><td class="num">15</td><td class="num">105.00</td><td class="num">1,575.00</td></tr>
<tr data-carried="20,360.00"><td>15</td><td>Frontend: cart and checkout</td><td class="num">22</td><td class="num">105.00</td><td class="num">2,310.00</td></tr>
<tr data-carried="21,095.00"><td>16</td><td>PDF export of orders</td><td class="num">7</td><td class="num">105.00</td><td class="num">735.00</td></tr>
<tr data-carried="21,695.00"><td>17</td><td>Performance budget and audit</td><td class="num">5</td><td class="num">120.00</td><td class="num">600.00</td></tr>
<tr data-carried="22,520.00"><td>18</td><td>Content migration</td><td class="num">11</td><td class="num">75.00</td><td class="num">825.00</td></tr>
<tr data-carried="22,860.00"><td>19</td><td>Search engine metadata</td><td class="num">4</td><td class="num">85.00</td><td class="num">340.00</td></tr>
<tr data-carried="23,145.00"><td>20</td><td>Analytics-free statistics setup</td><td class="num">3</td><td class="num">95.00</td><td class="num">285.00</td></tr>
<tr data-carried="23,385.00"><td>21</td><td>Staging environment</td><td class="num">2</td><td class="num">120.00</td><td class="num">240.00</td></tr>
<tr data-carried="23,745.00"><td>22</td><td>Load test</td><td class="num">3</td><td class="num">120.00</td><td class="num">360.00</td></tr>
<tr data-carried="24,645.00"><td>23</td><td>Editor training (remote)</td><td class="num">2</td><td class="num">450.00</td><td class="num">900.00</td></tr>
<tr data-carried="25,155.00"><td>24</td><td>Handover documentation</td><td class="num">6</td><td class="num">85.00</td><td class="num">510.00</td></tr>
<tr data-carried="26,415.00"><td>25</td><td>Project management</td><td class="num">14</td><td class="num">90.00</td><td class="num">1,260.00</td></tr>
<tr data-carried="27,015.00"><td>26</td><td>Support, first month</td><td class="num">1</td><td class="num">600.00</td><td class="num">600.00</td></tr>
</tbody>
</table>
<table class="totals">
<tr><td>Net</td><td class="num">27,015.00</td></tr>
<tr><td>VAT 19 %</td><td class="num">5,132.85</td></tr>
<tr class="grand"><td>Total EUR</td><td class="num">32,147.85</td></tr>
</table>
<div class="terms">
<p><strong>Payment</strong> within 14 days to IBAN DE00 0000 0000 0000 0000 00, reference 2026-0142.</p>
<p>Thank you for working with us.</p>
</div>
</body>
</html>
HTML document with CSS. Changes render after a short pause; Control or Command plus Enter renders at once. Tab indents; press Escape and then Tab to leave the editor.
Nothing to report: the check found nothing Fagus does not support, and Fagus ignored nothing.
No PDF yet
The PDF appears here.
The server renders with fagus worker processes that stay running, as the PHP package uses them, with only the built-in Inter font and no files to read. CSS reference · Getting started