Skip to content

Supported HTML and CSS

Documents are laid out for paper: pages, tables that continue across pages, headers and footers. The service supports the parts of HTML and CSS that matter for that. Anything outside it is ignored and reported by validation.

  • The CSS box model, with box-sizing, margins (including auto and negative), min- and max- sizes.
  • Tables, including colspan, rowspan, and header rows repeated on every page they span.
  • Flexbox: direction, wrap, grow, shrink, basis, align-* and justify-content.
  • A subset of grid: grid-template-columns with lengths, fr, auto and repeat(), and gap, with automatic row placement.
  • display: inline-block, multi-column text (column-count, column-gap), lists with markers, <hr>.
  • position: relative and absolute with offsets, and z-index.
  • @page size, orientation and margins, and top and bottom margin boxes for headers and footers, with counter(page) and counter(pages).
  • break-before, break-after, break-inside and the older page-break-* names, with widow and orphan control.
  • A PDF outline built from headings, and clickable links from <a href>.
  • Shaping for complex scripts and right-to-left text.
  • font-weight from 1 to 1000 and italic, for fonts that have those styles.
  • hyphens: manual, and automatic hyphenation for English.
  • Units px, pt, cm, mm, in, %, em and rem, and calc().
  • Colors, backgrounds, linear-gradient(), borders (solid, dashed, dotted), border-radius, box-shadow, opacity, and overflow: hidden.
  • SVG rect, circle and line, drawn as vector shapes.
  • PNG and JPEG images; see Images.

Tag, class, id, universal, attribute selectors with the common operators, descendant, child and sibling combinators, :nth-child, :first-child and :last-child. CSS custom properties with var() and fallbacks.

JavaScript, @font-face and @import, animations and transitions, pseudo-classes such as :hover, and most of what only makes sense on a screen. If you are unsure, validate the document.