Go back

How an obscure HTML tag can help with debugging

The plaintext tag stops HTML parsing and can help find broken markup, unexpected injections, and strange server output

How an obscure HTML tag can help with debugging

I’m sure you’ve never heard of the <plaintext> tag. It’s a genuine evil from the depths of the ancient internet: a tag that breaks the entire page after it.

The browser stops treating everything after <plaintext> as HTML and displays it as plain text. And it turns out you can use this for debugging: tracking down broken markup, unexpected injections, and strange server output.

It sounds like a bug, but works like a tool. Follow the link below for a look at why it might be useful at all 👇

Original Russian translation MDN

Copied