CKTIS / HTML
wbr — line break opportunity
The wbr element marks a position where the browser may wrap text onto another line, without forcing a line break.
Version: WHATWG HTML Living Standard; index snapshot date recorded separately
Syntax
<wbr>wbr represents a line break opportunity. Place it within a long string to mark an allowed wrapping point. Unlike br, it does not force a new line.
It is flow and phrasing content, allowed wherever phrasing content is expected. It accepts global attributes and uses the HTMLElement interface. It is a void element: it cannot contain content and has no end tag in HTML.
In the example, the 10ch width lets you check wrapping at wbr. After increasing the width to 20ch, the text should fit on one line.
Examples
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>wbr example</title>
<style>
p { width: 10ch; font-family: monospace; }
</style>
</head>
<body>
<p>alpha<wbr>betagamma</p>
</body>
</html>Result
alpha betagamma
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.