Content deleted Content added
→<br /> or <br>: if the emitted HTML uses <br/> there is no reason not to suggest its use as a replacement for the slashless forms |
|||
(17 intermediate revisions by 9 users not shown) | |||
Line 9:
===Newlines===
{{see|Wikipedia:
{{shortcut|H:PARAGRAPH}}
▲{{see|Wikipedia:Don't use line breaks|Wikipedia:Manual of Style#Controlling line breaks}}
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 36:
}}
===
{{shortcut|H:BR}}{{anchor|<br> or <br />|br|br/|br /}}
<code><nowiki><br></nowiki></code>, <code><nowiki><br ></nowiki></code>, <code><nowiki><br/></nowiki></code>, <code><nowiki><br /></nowiki></code>
The {{tag|br|s}} or {{tag|br|o}} tags are used for a single forced line break. For content that is semantically a list, such as in infoboxes, actual list markup is preferred. See {{format link|#Lists}} below.▼
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.
MediaWiki also converts <code><nowiki></br></nowiki></code> to {{tag|br|s}}, but this form is invalid. Please correct these tags.
▲
{{markup
|<nowiki>And this line of text<br
|And this line of text<br
}}
The example below includes four forms that are rendered as line breaks and two that display as plain text.
<div style="display:inline-table; border: 2px solid var(--border-color-content-added); padding: 0.5em;">
'''Wiki source'''
<nowiki>One <br>Two <br >Three <br/>Four <br />Five < br>Six </ br>Seven</nowiki>
</div>
<div style="display:inline-table; border: 2px solid var(--border-color-content-added); padding: 0.5em;">
'''Rendered result'''
One <br>Two <br >Three <br/>Four <br />Five < br>Six </ br>Seven
</div>
=== <poem> ===
Line 216 ⟶ 229:
== Preventing and controlling word wraps ==
{{Nutshell|title=This section|To prevent word wraps use <code>&nbsp;</code> in place of each space
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 358 ⟶ 371:
{{markup
|<nowiki>This long German word Datenschutz&shy;erklärung breaks between its constituent parts "Datenschutz" and "erklärung".</nowiki>
|This long German word Datenschutz­erklärung breaks between its constituent parts "Datenschutz" and "erklärung".
}}
Line 386 ⟶ 399:
== See also ==
* [[
* {{tl|break}}
* {{tl|clear}}
|