{diff $old, $new} compares two texts and writes the new one with what changed marked: the words that went out as <del>, the words that came in as <ins>. The differences are found by Myers' algorithm, the shortest edit script, as git diff finds them. In a run of changes the deletions come before the insertions, and the space between two changed words joins the change, so a rewritten phrase reads as one change instead of a patchwork.

lines compares line by line, in one column: the old and the new line number, a sign and the line. side puts the two versions next to each other, a changed line beside its counterpart. In both a changed line that has a counterpart marks the words that changed within it; a line without one is struck or added whole. from= and to= name the two versions.

Everything of both texts is escaped. A screen reader hears where each deletion and insertion starts and ends, from words in pseudo-elements that are hidden from the eye. The colours are custom properties on .pad-diff - --pad-diff-del, --pad-diff-ins and their -mark forms, -text, -muted, -line - with light-dark() defaults written once a page. A {diff} without the second text is a strict error.