Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-text/white-space/pre-wrap-align-center-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Text test: white-space:pre-wrap vs text-align</title>
<link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com">
<meta name="assert" content="white-space at end of line must hang">
<link rel="match" href="reference/pre-wrap-align-center-001-ref.html">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<style>
.test {
font: 20px Ahem, monospace;
width: 15ch;
border: 1px solid gray;
padding: 5px;
white-space: pre-wrap;
text-align: center;
}
</style>
</head>
<p>The text on each line should be neatly centered:</p>
<div class=test>one two three four five
six seven eight nine ten.
un deux trois quatre cinq
six sept huit neuf dix</div>