Template:Hanging indent/doc: Difference between revisions
No edit summary |
Deleatur yhe (talk | contribs) m 1 revision imported |
(No difference)
| |
Latest revision as of 14:56, 9 September 2026
| This is a documentation subpage for Template:Hanging indent. It may contain usage information, categories and other content that is not part of the original template page. |
__EXPECTED_UNCONNECTED_PAGE__
| This template is used on many pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This template creates a paragraph with a hanging indent.
{{{content}}}
Without:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Usage
This template has one parameter, which may be unnamed, numbered as <syntaxhighlight lang="wikitext" inline style="display: none;" />|1=, or named as either <syntaxhighlight lang="wikitext" inline style="display: none;" />|text= or <syntaxhighlight lang="wikitext" inline style="display: none;" />|content=. It is always safest to use the number or a name, since if it is unnamed, any = (equals) character in the content will break the template.
Wiki-markup example:
<syntaxhighlight lang="wikitext">
</syntaxhighlight>
produces:
Indentation within indentation
The entire paragraph itself can be indented and still preserve this hanging-indent effect relevant to its own indentation:
With {{In5}}
<syntaxhighlight lang="wikitext">
</syntaxhighlight>
produces a slight indentation of wrapped material:
(But note that this will not work:
<syntaxhighlight lang="wikitext">
</syntaxhighlight>
because it's trying to apply inline style to a block element.)
With {{Block indent}}
<syntaxhighlight lang="wikitext">
</syntaxhighlight>
produces full indentation of wrapped material:
Note: Do not abuse {{Quote}}, {{Pull quote}}, <blockquote>, or any other block quotation markup for non-quotations; the {{block indent}} template exists for a reason.
TemplateData
TemplateData for Hanging indent
<templatedata> { "params": { "indent": { "label": "Indent", "description": "Indentation level as a CSS length.", "type": "string", "default": "1.6em" }, "text": { "aliases": [ "content", "1" ], "label": "Content", "type": "content", "required": true } }, "description": "This template creates a paragraph with a hanging indent." } </templatedata>
See also
- {{Indent}}
- {{In5}}
- {{Block indent}}