<white-space>
propertyThe possible values of the white-space property are:
To prevent text from potentially wrapping at an inappropriate place, you can code the white-space: nowrap
property. This example is an alternative to coding (non-breaking space).
<span style="white-space: nowrap">12:00 pm</span> is noon
Since HTML coders should avoid the deprecated <nobr> tag, you can include white-space: nowrap
in a CSS file, and code <span>
tags with class="nobr"
instead:
<span class="nobr">12:00 am</span> is midnight
.nobr {
white-space: nowrap;
}
Prev: text-decoration Next: HTML Color Codes
Home > CSS Properties > white-space
Viewing mobile website page. Switch to WML or Full HTML