Template:Nowrap
Appearance
{{{1}}}
Purpose
[edit source]A simple template that prevents text from wrapping across lines.
Code
[edit source]<span style="white-space:nowrap">{{{1}}}</span>
Documentation
[edit source]Usage
[edit source]{{Nowrap|text that should not wrap}}
Parameters
[edit source]| Parameter | Required | Description |
|---|---|---|
| 1 | Yes | The text to display without line breaks. |
Examples
[edit source]| Code | Result |
|---|---|
| {{Nowrap|January 1, 2025}} | January 1, 2025 |
| {{Nowrap|100 km}} | 100 km |
| {{Nowrap|New York City}} | New York City |
When to use
[edit source]Use this template when you want to keep text together on one line, such as:
- Dates
- Measurements with units
- Names or titles that look awkward when split
- Short phrases within table cells and infobox templates
Example in context
[edit source]The city is located {{Nowrap|50 miles}} from the coast.
This ensures "50 miles" stays together rather than potentially wrapping as:
> The city is located 50 > miles from the coast.