[X]

Layout By Non-Breaking Space

layout hacks 1996 still works

Whitespace built out of entities, because HTML collapses real spaces.

In 2026: Works, and it is still the fastest way to break a layout on a phone. The empty table cell trick was necessary in Netscape 4, which drew no border or background at all around a genuinely empty cell.

Where it came from: Universal practice. The empty cell workaround is documented in Netscape's own authoring notes, 1996. Wikipedia

<!-- Fake indentation -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;This paragraph is indented four spaces.</p>

<!-- Fake column gap -->
<p>Left column&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Right column</p>

<!-- The empty cell that has to contain something -->
<table border="1" cellpadding="4">
<tr><td>Filled</td><td>&nbsp;</td></tr>
</table>

<!-- Fake vertical space -->
<br>&nbsp;<br>&nbsp;<br>

<!-- The 2026 version -->
<p style="text-indent:4em">Indented.</p>
<div style="height:2em"></div>
sandboxed demo · breaks nothing but itselfrestart

More in layout hacks

all 20 in layout hacks › · the whole library ›