Knowledge (XXG)

Template:Nowrap

Source 📝

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

Index

Template:Nobreak
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

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