en.m.wikipedia.org
Wikipedia:Manual of Style/Hidden text
< Wikipedia:Manual of Style
"WP:HIDDEN" redirects here. For the guideline against hiding content in articles, see MOS:DONTHIDE. For information about hidden categories, see WP:HIDDENCAT. For information about how to hide/show collapsed text, see Template:Hidden.
This guideline is a part of the English Wikipedia's Manual of Style.
It is a generally accepted standard that editors should attempt to follow, though it is best treated with common sense, and occasional exceptions may apply. Any substantive edit to this page should reflect consensus. When in doubt, discuss first on the talk page.
This page in a nutshell: Hidden text, that is visible only when editing, can be inserted into articles, project pages, and other Wikipedia pages, by surrounding the text as follows: <!-- Hidden text -->
On Wikipedia, hidden text is text that is visible when editing the source for the page or when using VisualEditor, but not on the "rendered" version of the page presented to readers of the article.
Invisible comments are useful for alerting other editors to issues such as common mistakes that regularly occur in the article, a section title's being the target of an incoming link, or pointing to a discussion that established a consensus relating to the article. They should not be used to instruct other editors not to perform certain edits, although where existing local consensus is against making such an edit, they may usefully draw the editor's attention to that. Avoid adding too many invisible comments because they can clutter the wiki source for other editors.
Appropriate uses for hidden text
Some situations where hidden text is useful and good to have in articles:
In this case, it is often better to use an anchor in the first place.
Inappropriate uses for hidden text
Types of hidden text that should not be added include:
How to enter hidden text
Enter <!-- Comment --> and replace the word "Comment" with the hidden text you wish to enter. Check that your invisible comment does not change the formatting, for example by introducing unwanted white space in the rendered page. This can often happen when a comment is surrounded by line breaks: here is an example.
The clock tower was constructed in 1928,<ref name="historicalsociety"/> and while it was struck by lightning in November 1955,<ref name="picayune"/> <!-- The Picayune-Herald article lists it as being constructed in 1929, but the Historical Society's book (and the original city documents) show it was built in 1928. --> it remained functional until 1987, <!-- Some sources erroneously cite this as having taken place in 1989. --> when its face was permanently damaged in a fight between a high school student and an immortal vampire.<ref name="araki"/>
will render as:
The clock tower was constructed in 1928,[1] and while it was struck by lightning in November 1955,[2]

it remained functional until 1987,

when its face was permanently damaged in a fight between a high school student and an immortal vampire.[3]
This problem can be avoided by removing the line breaks before and after the comments, but this may make reading the source cumbersome for large blocks of text. Comments can still be separated from page content with single line breaks, or multiple line breaks in the comment itself:
The clock tower was constructed in 1928,<ref name="historicalsociety"/> and while it was struck by lightning in November 1955,<ref name="picayune"/><!-- The Picayune-Herald article lists it as being constructed in 1929, but the Historical Society's book (and the original city documents) show it was built in 1928. --> it remained functional until 1987, <!--Some sources erroneously cite this as having taken place in 1989.--> when its face was permanently damaged in a fight between a high school student and an immortal vampire.<ref name="araki"/>
will render properly:
The clock tower was constructed in 1928,[1] and while it was struck by lightning in November 1955,[2] it remained functional until 1987, when its face was permanently damaged in a fight between a high school student and an immortal vampire.[3]
See also
Last edited on 18 April 2021, at 05:47
Content is available under CC BY-SA 3.0 unless otherwise noted.
Privacy policy
Terms of Use
Desktop
HomeRandomNearbyLog inSettingsDonateAbout WikipediaDisclaimers
LanguageWatchEdit