Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Template:Wbr/doc
Template
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> {{High-use}} ''Wbr'' indicates a ''word break'' opportunity. This template includes the HTML tag [https://www.w3.org/TR/html5/text-level-semantics.html#the-wbr-element {{tag|wbr|s}}], which is used to tell the browser of an optional, non-hyphenated line-break. It can be used with: * {{tlx|nbsp}} or the equivalent <code>&nbsp;</code> (non-breaking space) * {{tlx|nowrap}} or the equivalent <code><nowiki><span style="white-space: nowrap;">...</span></nowiki></code> or <code><nowiki><span class="nowrap">...</span></nowiki></code> (character string that will not break even at a normal space) to carefully control line-breaking where this is important. This template can safely be [[wikipedia:WP:SUBST|substituted]], though there is no particular reason to do so. For breaking up long words, use {{tlx|Soft hyphen}} instead. ==Usage== Use is simple; there are no parameters: * {{tlx|wbr}} or * {{tlxs|wbr}} ===Controlling line-breaking in infoboxes ===<!--This section name is linked to from other template documentation.--> This template can be used to cause an indentation after a linebreak, in [[Template:Plainlist|unbulleted lists]] inside [[wikipedia:WP:Infobox|infoboxes]] and in [[wikipedia:WP:Table|tables]] with constrained cell widths, by using <code><nowiki>{{wbr}}&nbsp;</nowiki></code> between words in an entry, so that when they wrap they are not mistaken for separate entries. See example infobox to the side. Example infobox (rendered to the side of the example code): {{Infobox film| |name=Test Infobox II: The Revenge |... |starring={{Plainlist| * Jane Smith * {{nobr|Johannes-Friedrich}}{{wbr}} Zauberzunge{{wbr}} {{nobr|von der Hasenpfeffer}} * John Garcia }} |... |italic_title=no }} <syntaxhighlight lang="wikitext">{{Infobox film| |name=Test Infobox II: The Revenge |... |starring={{Plainlist| * Jane Smith * {{nobr|Johannes-Friedrich}}{{wbr}} Zauberzunge{{wbr}} {{nobr|von der Hasenpfeffer}} * John Garcia }} |... }}</syntaxhighlight> === Breaking up slashes === {{see|MOS:SLASH}} When there are long words on both sides of a slash, this template may be used to induce a line break after the slash. :installation/{{wbr}}execution :<syntaxhighlight lang="wikitext" inline=yes>installation/{{wbr}}execution</syntaxhighlight> ==Technical details== This template encapsulates the code <code><nowiki><wbr />&#8203;</nowiki></code>, i.e. the HTML5 [[HTML element#wbr|line break opportunity element]] followed by the HTML character entity for the {{Unichar|200B|ZERO WIDTH SPACE|nlink=Zero-width space}} character. This approach is superior to using either one or the other in isolation, for increased browser support. The {{tag|wbr|s}} element is compatible with all browsers except [[Internet Explorer]] inclusive of and {{em|since}} version 7 ({{as of|lc=y|2015|09}}). Meanwhile, the ZWS character is compatible with all browsers except Internet Explorer {{em|earlier than}} (but not inclusive of) version 7. Thus, between the two approaches, the dual use of which has no ill effects, this template works in all browsers still likely to be in use, including Internet Explorer regardless of version. <includeonly>{{Sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:Line-handling templates]] [[Category:Inline spacing templates]] [[Category:Character templates]] }}</includeonly>
Summary:
Please note that all contributions to Red Letter Media Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
RLMWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:As of
(
edit
)
Template:DMCA
(
edit
)
Template:Dated maintenance category
(
edit
)
Template:Dated maintenance category (articles)
(
edit
)
Template:Dir
(
edit
)
Template:Documentation subpage
(
edit
)
Template:Em
(
edit
)
Template:FULLROOTPAGENAME
(
edit
)
Template:Further
(
edit
)
Template:Hex2dec
(
edit
)
Template:High-use
(
edit
)
Template:If empty
(
edit
)
Template:Ifsubst
(
edit
)
Template:Infobox
(
view source
) (protected)
Template:Infobox film
(
edit
)
Template:MONTHNAME
(
edit
)
Template:MONTHNUMBER
(
edit
)
Template:Main other
(
edit
)
Template:Mbox
(
edit
)
Template:Mbox/styles.css
(
edit
)
Template:Mono
(
edit
)
Template:Mono/styles.css
(
edit
)
Template:Nobr
(
edit
)
Template:Nowrap
(
edit
)
Template:Ns has subpages
(
edit
)
Template:Plainlist
(
edit
)
Template:Plainlist/styles.css
(
edit
)
Template:See
(
edit
)
Template:Str left
(
edit
)
Template:Strong
(
edit
)
Template:Tag
(
edit
)
Template:Template link expanded
(
edit
)
Template:Template link expanded with subst
(
edit
)
Template:Template other
(
edit
)
Template:Terminate sentence
(
edit
)
Template:Tlx
(
edit
)
Template:Tlxs
(
edit
)
Template:Unichar
(
edit
)
Template:Unichar/gc
(
edit
)
Template:Unichar/glyph
(
edit
)
Template:Unichar/hexformat
(
edit
)
Template:Unichar/main
(
edit
)
Template:Unichar/name
(
edit
)
Template:Unichar/notes
(
edit
)
Template:Unichar/ulink
(
edit
)
Template:Wbr
(
edit
)
Template:Yesno
(
edit
)
Module:Arguments
(
edit
)
Module:BaseConvert
(
edit
)
Module:Check for unknown parameters
(
edit
)
Module:Format link
(
edit
)
Module:Hatnote
(
edit
)
Module:Hatnote/styles.css
(
edit
)
Module:Hatnote list
(
edit
)
Module:High-use
(
edit
)
Module:If empty
(
edit
)
Module:Infobox
(
edit
)
Module:Infobox/styles.css
(
edit
)
Module:InfoboxImage
(
edit
)
Module:Italic title
(
edit
)
Module:Labelled list hatnote
(
edit
)
Module:Message box
(
edit
)
Module:Message box/configuration
(
edit
)
Module:Message box/ombox.css
(
edit
)
Module:Ns has subpages
(
edit
)
Module:Template link general
(
edit
)
Module:Text
(
edit
)
Module:Transclusion count
(
edit
)
Module:Transclusion count/data/W
(
edit
)
Module:Unicode data
(
edit
)
Module:Unicode data/names/002
(
edit
)
Module:Yesno
(
edit
)
Toggle limited content width