Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Text: hanging-punctuation allow-end</title>
<link rel="match" href="reference/hanging-punctuation-allow-end-ref.html">
<meta name="assert" content="hanging-punctuation: allow-end causes punctuation to hang at the end of a line when it would otherwise overflow. Punctuation does not hang for justified lines, after br elements introduce a break, or when a nowrap span prevents breaking before the punctuation.">
<link rel="stylesheet" href="/fonts/ahem.css">
<style>
body { font-family: 'Ahem'; color:green }
.hang { hanging-punctuation: allow-end; margin:1em; width:5em; border:2px solid black }
</style>
<div style="float:left" class="hang">12 34,</div>
<div style="clear:both">
<div class="hang">12 34, 1234,</div>
<div class="hang" style="text-align:justify;">12 34,</div>
<div class="hang">12 34,<br>12345</div>
<div class="hang">12 34,56 1234<br>12345</div>
<div class="hang">12 <span style="white-space:nowrap">34,<div style="display:inline-block">56</div></span> 1234<br>12345</div>