Help:Whitespace: Difference between revisions

Content deleted Content added
m Reverted edits by 2C0F:FC89:809F:FD4F:1:0:6E41:E05E (talk) to last version by Waddie96
 
(48 intermediate revisions by 24 users not shown)
Line 1:
{{about|the appearance of blank space on an article|the Manual of Style section on using line breaks in an article|MOS:LINEBREAKS}}
[[File:WhiteSpace.jpg|right|thumb|350px|TheThis Wikipedia article shown here is a stub. It has a minimal amount of body text along with an infobox on the right and a navbox at the bottom. The remainder of the page is blank, known as whitespace.]]
{{shortcut|WP:WHITE}}
 
'''Whitespace''' isrefers to any [[Blank space (punctuation)|blank space]] that appears on the published version of a Wikipedia page inacross anyall namespace.[[Wikipedia:Namespaces|namespaces]] Itthat is notfree occupiedof by any[[special characters]], [[Wikipedia:Templates|templates]], multimedia[[Wikipedia:Multimedia|media]], or anythingother [[HTML elseelements]]. In other words, it appears as empty, ''white.'' space.
 
Whitespace is not always desirable. It can give the page an untidy appearance and make the article look altogether incomplete. But it cannot always be avoided, and there are times, when itused maysparingly, actuallywhitespace comecan inenhance handyreadability whenand visual balance, helping readers to better navigate and absorb the addedcontent inon smallthe amountspage.
 
==Causes of whitespace==
===Table of contents===
On pages with multiple headings, a [[WP:TOC|table of contents]] listing the headings is automatically generated. When this occurs, the table of contents box will appear on the left side of the page between the lead section and the first heading. There will be no text to the right of the table of contents, though an image or a vertical template, such as an [[WP:INFOBOX|infobox]], will appear in the space to the right if formatting causes it to require that space. Still, no text will appear in the space in between; it'll be white. (Asas you notice, there is some white space between the TOC box and the image above).
 
There are various ways to modify the appearing of the table of contents. Entering the templates {{tlTlx|TOCleftTOC left}} or {{tlTlx|TOCrightTOC right}} at the top of the page will produce a table of contents to the left or right that does share its lines with some text. The [[Help:Magic words|magic word]] <nowiki>__NOTOC__</nowiki> will cause the table of contents to be altogether absent, which for some pages may be necessary.
 
It is also possible to produce your own table of contents as follows:<br />
----
<syntaxhighlight lang="wikitext">
<pre><nowiki>
{| id="toc" class="toc" summary="Contents"
! {{MediaWiki:Toc}}
Line 22 ⟶ 23:
__NOTOC__
|}
</syntaxhighlight>
</nowiki></pre>
----
 
Line 31 ⟶ 32:
 
===Images===
Sometimes, images can contribute to whitespace. But the size of images can be controlled, so if an image is causing there to be a lot of whitespace, it may be worth reducing the size of the image, even just a little, in order to fill more of that space with text (depending on display width). Beware, though, of making one image significantly narrower than all others.
 
On a short page, a single image may be to blame for whitespace. If the height of the image is greater than that of the text, there will be some whitespace at the bottom.
 
On a longer page divided by multiple headings, it may be desirable to provide a small amount of whitespace (via additional blank lines added simply by hittingusing "ENTER"the on{{Tlx|Clear}} yourfamily of keyboard)templates so the image does not protrude into the next paragraph or section. TheUsing captionseveral belowblank thelines, image{{tag|br|s}} contributestags toor its{{Tlx|Break}} height,will sonot thiswork willcorrectly takefor theall artdisplay ofwidths, balancingand thesurplus imageblank sizelines toare theseremoved extraby linesa number of processes.
 
Many infoboxes have room fortake an image, so if an image is placed there, it'll add more height that hopefullymay you'llbenefit befrom ablebalancing towith matchtext upand withother theleft-justified textcontent.
 
===Invisible comments===
[[Help:Hidden text|Comments]] in the wikicode added by <ttcode><nowiki><&lt;!-- Comment --></nowiki></ttcode> can contribute to whitespace. Format the comment to avoid this, by ensuring either that the initial <code>&lt;</code> touches the text immediately beforehand, or that the final <code>&gt;</code> touches the text immediately afterwards:
... the end of a paragraph.
&nbsp;
Line 54 ⟶ 55:
 
==Addressing the whitespace issue==
Very oftenSometimes, when you have undesirable whitespace, the onlybest way to solve the problem is to expand the article. But only sourced information that belongs should be added. Under no circumstances should you feel compelled to add unnecessary text to an article in order to eliminate or reduce whitespace. It is better to have a page filled (with whitespace thansuitable nonsensecontent).
 
Sometimes, a minor fix will help eliminate or reduce whitespace. This may involve adding or removing one blank line from some part of the page, re-ordering templates, or the use of a [[WP:GALLERY|gallery]] for multiple images. If an embedded list creates white space, using two or more columns may solve the problem.
 
== Caveats ==
{{Readership}}
 
Avoid "fixing" white space issues which are peculiar to your combination of screen, window, and font sizes, your choice of browser, your image settings, and so on. Check with other settings or systems, or ask other editors to check them for you.
 
Avoid "fixes" which break the appearance of the page on mobile devices. Again, if you do not have a suitable device on which to check, other editors can advise you.
 
==See also==
*[[:Category:Inline spacing templates]]
 
[[Category:Wikipedia page help]]