Help:Line-break handling: Difference between revisions

Content deleted Content added
rmv some WP:SURPRISEME stuff ("use the simplest form", other stuff does not work). Also explain </br>
 
(10 intermediate revisions by 4 users not shown)
Line 9:
 
===Newlines===
{{see|Wikipedia:Don'tLine usebreaks line breaksusage|Wikipedia:Manual of Style#Controlling line breaks}}
{{shortcut|H:PARAGRAPH}}
There are several ways to force [[newline|line breaks]] and [[hard return|paragraph breaks]] in the text. The simplest method is by inserting newlines; for example:
Line 39:
{{shortcut|H:BR}}{{anchor|&lt;br&gt; or &lt;br /&gt;|br|br/|br /}}
 
<code><nowiki><br></nowiki></code>, <code><nowiki><br ></nowiki></code>, <code><nowiki><br/></nowiki></code>, <code><nowiki><br /></nowiki></code>
 
The [[MediaWiki]] software uses any of them for a single forced line break. All of them are converted to {{tag|br|s}} in the HTML that browsers read.
Line 52:
}}
 
The example below includes fivefour forms, including the invalid <code><nowiki></br></nowiki></code>, that are rendered as line breaks and two that display as plain text.
<div style="display:inline-table; border: 2px solid limevar(--border-color-content-added); padding: 0.5em;">
'''Wiki source'''
 
<nowiki>One <br>Two <br >Three </br/>Four <br />Five < br />Six </ br>Seven </ br>Eight</nowiki>
</div>
 
<div style="display:inline-table; border: 2px solid limevar(--border-color-content-added); padding: 0.5em;">
'''Rendered result'''
 
One <br>Two <br >Three </br/>Four <br />Five < br />Six </ br>Seven </ br>Eight
</div>
 
Line 229:
 
== Preventing and controlling word wraps ==
{{Nutshell|title=This section|To prevent word wraps use <code>&amp;nbsp;</code> in place of each space,; and oruse <code>&amp;#8209;</code> in place of aeach hyphen. For more complex cases, see below.}}
 
There are several ways to prevent word wraps (line wraps) from occurring in unwanted places. This is an overview of when to use which method.
Line 399:
 
== See also ==
* [[metamw:HelpManual:Newlines and spaces]]
* {{tl|break}}
* {{tl|clear}}