Register
Lines are in register when they stand on the same heights: across the columns of a page, and on the front and back of a leaf. Thin paper shows why this matters, because the lines of the back shine through between the lines of the front, unless they meet.
One CSS property does it:
body {
line-height: 12pt;
line-snap: baseline;
}
h1, h2 {
line-snap: none;
}line-snap puts every line of running text on a grid that belongs to the page, whatever headings, tables and figures come between them. The how-to Keep lines in register across columns explains where the rest goes, what to do with text of another size and where the limits are.
Both sides of a leaf
The grid starts at the top of the page area. For the lines of the front to meet the lines of the back, both sides need the same page size and the same top margin, so that the grid starts at the same height. @page :left and :right may swap the inner and outer margins, but they should not change the top margin.
See the grid
The trace draws the grid into the PDF, numbered at the right edge:
glu --trace linegrid document.htmlHold two pages against the light, or lay them over each other in a PDF viewer. See Debugging for how to read the trace.