Knowledge (XXG)

Template:Nowrap

Source 📝

26: 103: 57: 133: 221:. It prevents word wraps (line breaks) that might otherwise happen at spaces, hyphens ("-"), or, in some browsers, parentheses. The size of the nowrapped text becomes the minimum width of that paragraph and that can negatively influence the ability of the page to adapt to smaller screens, or alternate representations of the content. 741: 960: 945: 933: 41: 727: 972: 929: 804:
prevents wraps in both text and links. For the trickier wrapping cases when you need full control, for instance in very complex link lists.
37: 407:
to control line-breaking in bulletless lists in infoboxes, to prevent wrapped long entries from being confused with multiple entries. See
915: 988: 734: 237: 782:
prevents wraps inside links while allowing wraps between links and in normal text. Very useful for link lists and easy to use.
118: 45: 110: 650: 955: 81: 646: 638: 114: 897: 840:
does the same and allows further style customization, but does not automatically add the "avoidwrap" CSS class.
776: 940: 872: 214: 77: 85: 642: 760:
prevents wrapping within a single template (i.e. not suitable for relatively complex or lengthy content).
834: 788: 454: 143: 139: 161: 810: 766: 626: 89: 64: 667:
Prevents word wraps (line breaks) within text or inside a link which contains spaces or hyphens (-).
968: 923: 822: 798: 464: 33: 903:
In particular, to avoid line wrapping when quoting a passage such as a poem or computer code, see
151: 88:. The tested changes can be added to this page in a single edit. Please discuss changes on the 919: 132: 408: 848: 402: 76:
To avoid major disruption and server load, any changes should be tested in the template's
887: 442:" is inside a wikilink or another template. In the case that there is a bare equal-sign " 904: 982: 883: 860: 419: 564: 394: 231: 74:
Changes to it can cause immediate changes to the Knowledge (XXG) user interface.
828:
prevents wraps unless the space is too narrow to display the text on one line.
891: 423: 69: 20: 900:, Knowledge (XXG)'s how-to guide about word wrapping and line breaks. 866:
can be used to provide a (brief) exception within a no-wrapping area.
217:
of specific text (which can be inside of a link). Use this template
70:
approximately 8,650,000 pages, or roughly 14% of all pages
516:
For text that includes a vertical bar "|", escape the bar(s) with "
236:. For more information about wrapping and breaking sentences, see 147: 473:
For text that includes an equal-sign "=", precede the text with
138:
This template should not be used in citation templates such as
127: 97: 51: 434:" (pipes). Note that this does not apply if the equal-sign " 907: – e.g. Template:Blockquote with "poem" tag. 569:
tag that applies a class to the text inside the template:
854:
produces multiple non-breaking spaces (or a single one).
949: 409:
Template:Wbr/doc#Controlling line-breaking in infoboxes
188: 179: 170: 470:
instead. However, there are also other workarounds:
878:
allows links to wrap when they otherwise would not.
611: 573: 146:, because it includes markup that will pollute the 816:prevents wraps for both two adjacent characters. 422:have problems with parameter data that contains 561:The actual code that does the job is this HTML 528:". For instance, put two bars "|6|" like this: 341:He encountered {{Nowrap|a tiger}} in the woods. 735: 8: 664: 294:They held {{Nowrap|10 kg (22 lb)}} in total. 657:in articles based on its TemplateData. 939:Editors can experiment in this template's 742: 728: 670: 288: 533:{{Nowrap|&#124;6&#124; < 7}} 477:, use a triple-brace unnamed parameter 387:Controlling line-breaking in infoboxes 7: 651:See a monthly parameter usage report 252:{{Nowrap|these words stay together}} 109:This template can only be edited by 562: 537:{{Nowrap|{{pipe}}6{{pipe}} < 7}} 238:Knowledge (XXG):Line-break handling 224:To achieve the opposite effect of 14: 905:Template:Quote § Line breaks 131: 101: 55: 24: 391:This template may be used with 226:{{nowrap}} 1: 704:Text or link to be protected. 890:, spaced and wrap-sensitive 350:He encountered a tiger 541:{{Nowrap|{{abs|6}} < 7}} 495:{{Nowrap|2 + 2 {{{|=}}} 4}} 262:{{Nowrap| merry-go-round }} 150:metadata they produce; see 1005: 913: 641:for this template used by 610:receives the CSS property 505:which all render as this: 415:Handling equal-sign or bar 159: 973:Subpages of this template 888:{{•}} 884:{{·}} 678: 485:magic word. For example: 257:{{Nowrap|a, b, c, or d.}} 92:before implementing them. 84:subpages, or in your own 63:This template is used in 898:Help:Line-break handling 500:{{Nowrap|2 + 2 {{=}} 4}} 989:Line-handling templates 660:TemplateData for Nowrap 592:This text will not wrap 319:10 kg (22 lb) in total. 967:Add categories to the 490:{{Nowrap|1=2 + 2 = 4}} 346:May render like this: 299:May render like this: 29:Template documentation 546:Which renders this: 363:a tiger in the woods. 152:Knowledge (XXG):COinS 627:MediaWiki:Common.css 551:|6| < 7 430:" or vertical bars " 332:They held 10 kg (22 65:MediaWiki:Histlegend 924:Template:Nowrap/doc 718: 675: 673:Template parameters 446:" or vertical bar " 438:" or vertical bar " 378:tiger in the woods. 671: 669: 587:"nowrap" 450:", consider using 328:render like this: 894:(dot) and bullet. 717: 716: 691: 665: 649:and other tools. 557:Technical details 384: 383: 376:He encountered a 158: 157: 126: 125: 119:cascade-protected 117:onto one or more 96: 95: 996: 964: 953: 937: 877: 871: 865: 859: 853: 847: 839: 833: 827: 821: 815: 809: 803: 797: 793: 787: 781: 775: 771: 765: 759: 753: 744: 737: 730: 700: 692: 676: 624: 623: 620: 617: 614: 609: 602: 601: 598: 595: 591: 588: 585: 582: 579: 576: 568: 552: 542: 538: 534: 527: 523: 519: 511: 501: 496: 491: 484: 480: 476: 469: 463: 459: 453: 449: 445: 441: 437: 433: 429: 406: 398: 342: 306: 295: 289: 278: 273: 268: 263: 258: 253: 235: 227: 212: 204: 191: 182: 173: 144:Citation Style 2 140:Citation Style 1 135: 128: 105: 104: 98: 59: 58: 52: 49: 30: 28: 27: 18: 1004: 1003: 999: 998: 997: 995: 994: 993: 979: 978: 977: 976: 966: 958: 943: 938: 927: 912: 875: 869: 863: 857: 851: 845: 837: 831: 825: 819: 813: 807: 801: 795: 791: 785: 779: 777:nowraplinks end 773: 769: 763: 757: 751: 748: 723: 698: 663: 655:Template:Nowrap 635: 621: 618: 615: 612: 607: 599: 596: 593: 589: 586: 583: 580: 577: 574: 559: 550: 540: 539: or  536: 535: or  532: 525: 521: 517: 509: 499: 498: 494: 493: 489: 482: 478: 474: 467: 461: 457: 451: 447: 443: 439: 435: 431: 427: 417: 400: 392: 389: 377: 367: 362: 361:He encountered 356: 351: 345: 340: 333: 323: 318: 312: 307: 304: 298: 293: 287: 276: 271: 266: 261: 256: 251: 246: 229: 225: 206: 198: 196: 195: 187: 178: 169: 164: 122: 102: 75: 73: 56: 50: 31: 25: 23: 16: 12: 11: 5: 1002: 1000: 992: 991: 981: 980: 911: 910: 909: 908: 895: 881: 880: 879: 873:normalwraplink 855: 843: 842: 841: 817: 805: 783: 761: 747: 746: 739: 732: 724: 722: 719: 715: 714: 711: 708: 707: 701: 696: 690: 689: 686: 683: 680: 643:TemplateWizard 636: 634: 631: 604: 603: 558: 555: 554: 553: 544: 543: 514: 513: 503: 502: 416: 413: 388: 385: 382: 381: 380: 379: 365: 364: 357:Or like this: 354: 353: 337: 336: 335: 321: 320: 313:Or like this: 310: 309: 286: 283: 282: 281: 280: 279: 277:{{Nowrap| ] }} 274: 272:{{Nowrap| ] }} 269: 267:{{Nowrap| ] }} 264: 259: 254: 245: 242: 228:, you can use 194: 193: 184: 175: 165: 160: 156: 155: 136: 124: 123: 113:because it is 111:administrators 108: 106: 94: 93: 60: 22: 21: 13: 10: 9: 6: 4: 3: 2: 1001: 990: 987: 986: 984: 974: 970: 962: 957: 951: 947: 942: 935: 931: 925: 921: 917: 916:documentation 906: 902: 901: 899: 896: 893: 889: 885: 882: 874: 868: 867: 862: 856: 850: 844: 836: 830: 829: 824: 818: 812: 806: 800: 790: 784: 778: 768: 762: 756: 750: 749: 745: 740: 738: 733: 731: 726: 725: 720: 712: 709: 706: 705: 702: 697: 694: 693: 687: 684: 681: 677: 674: 668: 662: 661: 656: 652: 648: 644: 640: 632: 630: 628: 572: 571: 570: 566: 556: 549: 548: 547: 531: 530: 529: 508: 507: 506: 488: 487: 486: 471: 466: 456: 425: 421: 414: 412: 411:for details. 410: 404: 396: 386: 375: 374: 373: 371: 360: 359: 358: 352:in the woods. 349: 348: 347: 338: 334:lb) in total. 331: 330: 329: 327: 316: 315: 314: 305:10 kg (22 lb) 302: 301: 300: 291: 290: 284: 275: 270: 265: 260: 255: 250: 249: 248: 247: 243: 241: 239: 233: 222: 220: 216: 210: 202: 190: 185: 181: 176: 172: 167: 166: 163: 153: 149: 145: 141: 137: 134: 130: 129: 120: 116: 112: 107: 100: 99: 91: 87: 83: 79: 71: 67: 66: 61: 54: 53: 47: 43: 39: 35: 19: 876:}} 870:{{ 864:}} 858:{{ 852:}} 846:{{ 838:}} 835:inline block 832:{{ 826:}} 820:{{ 814:}} 808:{{ 802:}} 796:{{ 792:}} 789:nowrap begin 786:{{ 780:}} 774:{{ 770:}} 764:{{ 758:}} 754: 752:{{ 703: 672: 666: 659: 658: 654: 647:VisualEditor 639:TemplateData 637:This is the 633:TemplateData 605: 560: 545: 515: 504: 472: 468:}} 462:{{ 458:}} 455:Nowrap begin 452:{{ 418: 405:}} 401:{{ 397:}} 393:{{ 390: 369: 366: 355: 344: 325: 322: 311: 297: 234:}} 230:{{ 223: 218: 211:}} 208: 207:{{ 203:}} 200: 199:{{ 197: 192:}} 186:{{ 183:}} 177:{{ 174:}} 168:{{ 86:user subpage 62: 15: 920:transcluded 811:word joiner 767:nowraplinks 682:Description 613:white-space 424:equal-signs 372:like this: 115:transcluded 44:] [ 40:] [ 36:] [ 914:The above 892:interpunct 823:avoid wrap 799:nowrap end 606:The class 518:&#124; 465:Nowrap end 317:They held 303:They held 82:/testcases 971:subpage. 956:testcases 679:Parameter 510:2 + 2 = 4 481:, or the 420:Templates 308:in total. 219:sparingly 162:Shortcuts 90:talk page 68:, and on 983:Category 721:See also 713:required 522:{{pipe}} 479:{{{|=}}} 285:Examples 215:wrapping 78:/sandbox 948:| 941:sandbox 934:history 932:| 526:{{abs}} 180:nobreak 42:history 17:{{{1}}} 965:pages. 849:spaces 755:nowrap 710:String 688:Status 619:nowrap 608:nowrap 524:" or " 520:" or " 403:Spaces 213:stops 209:nowrap 201:Nowrap 121:pages. 922:from 594:</ 581:class 497:, or 483:{{=}} 244:Usage 148:COinS 48:] 46:purge 32:[ 969:/doc 961:edit 954:and 950:diff 946:edit 930:edit 886:and 861:wrap 794:... 772:... 743:edit 736:talk 729:view 695:Text 685:Type 653:for 600:> 597:span 590:> 578:span 575:< 567:> 565:span 563:< 399:and 368:But 324:But 171:nobr 142:and 38:edit 34:view 918:is 625:in 395:Wbr 370:not 326:not 232:wbr 205:or 189:nwr 80:or 985:: 926:. 645:, 629:. 492:, 475:1= 460:+ 343:" 296:" 240:. 154:. 975:. 963:) 959:( 952:) 944:( 936:) 928:( 699:1 622:; 616:: 584:= 512:. 448:| 444:= 440:| 436:= 432:| 428:= 426:" 339:" 292:" 72:.

Index

view
edit
history
purge
MediaWiki:Histlegend
approximately 8,650,000 pages, or roughly 14% of all pages
/sandbox
/testcases
user subpage
talk page
administrators
transcluded
cascade-protected

Citation Style 1
Citation Style 2
COinS
Knowledge (XXG):COinS
Shortcuts
nobr
nobreak
nwr
Nowrap
nowrap
wrapping
wbr
Knowledge (XXG):Line-break handling
Wbr
Spaces
Template:Wbr/doc#Controlling line-breaking in infoboxes

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.