technique reference · by file type

Hidden text on web pages

A web page can hide text from its visitors with CSS — display:none, zero opacity, white on white, text moved off screen or clipped out of view — or put it where a browser never paints it at all, such as comments and attributes.

A model that reads the page, or text extracted from it, reads all of that. A crawl of more than a billion pages has found real prompt injections hidden exactly this way. Below is every way we detect hidden text on web pages.

html.accessibility-textText an author deliberately hid from sight and left for assistive technology — a skip link, an `.sr-only` label — recorded so a reviewer knows it is there, and graded quietly because it is an accessibility practice.htmlhtml.attribute-textProse sitting in attributes that extractors and screen readers read and that a page never displays as body text.htmlhtml.bidi-overrideMarkup that forces a writing direction against the text's own, so a reader sees one string and every extractor reads its reverse.htmlhtml.blank-fontText set in a font the page itself embeds, whose glyph for every letter of that text has no outline — laid out, taking up its width, painting nothing.htmlhtml.clipped-textText whose box is where it should be and at a real size, with the paint cropped away — either entirely, or everything past a fold.htmlhtml.commentAn HTML comment: read by every extractor that touches the bytes, displayed by nothing.htmlhtml.details-collapsedText inside a `<details>` element that has no `open` attribute — a fold a reader must click and a reviewer skimming pages does not.htmlhtml.display-noneAn element the page's own CSS takes out of the layout, with body text still inside it.htmlhtml.font-remapA font the page embeds and applies to text maps a digit to a glyph that cannot be that digit, so a reader sees different numbers from the ones the page stores.htmlhtml.hidden-uiThe same concealment as `html.display-none`, in a place where it is the page's own furniture — a collapsed menu, an unopened dialog, a cookie notice — and graded quietly for that reason.htmlhtml.inert-containerText inside an element the DOM holds and the browser never paints — a `<template>`, a `<noscript>`, or the fallback children of a `<canvas>` or `<object>`.htmlhtml.occluded-textOrdinary text — normal size, normal colour, normal place — with an opaque element painted flat on top of it.htmlhtml.offscreenText moved far outside the rendered area by a position offset, an indent or a transform.htmlhtml.preheaderThe hidden line an inbox shows in its message preview and the opened message never does — an email idiom, recorded and deliberately not alarming.htmlhtml.text-layerA document that is essentially all page pictures with the extracted text laid invisibly beside them — searchable by machine, unreadable by eye, and not an attack.flaggedhtmlhtml.uninspected-fontThe page applies a web font to text whose glyphs this engine could not check, so the extracted text may differ from what a reader sees.htmlhtml.white-textText whose resolved colour and resolved ground are too close in contrast for a reader to separate them.htmlhtml.zero-fontText set at a font size too small for a person to read at any zoom, while the characters remain in the document.htmlhtml.zero-opacityText that paints nothing at all, because the element or the colour itself is transparent.html

See also: Hidden injections found in the wild · Hidden text in email

other file types
Hidden text in PDF filesHidden text in Word documentsHidden text in Excel spreadsheetsHidden text in PowerPoint presentationsHidden text in emailHidden text in RTF filesHidden text in plain text and Markdown filesInvisible and hidden Unicode characters