This template is used to present markup or code side by side with the output it renders.
Usage
Each cell in the first ("Markup") column uses <pre> to retain newlines and spaces but styled to allow content to wrap within it. It is usually desirable to escape the content of these cells so that the markup is displayed by wrapping the markup in Plantilya:Xtag. It is technically not possible to add this feature to the template.
Each cell in the second ("Renders as") column is usually the unescaped markup copied from the corresponding "Markup" cell before it. There are instances where this may differ:
If the first line includes wikimarkup that must start on a new line such as #, * or ; then use <nowiki /> before the first line; see examples below.
Header markup such as == will show in the page table of contents; use {{fake heading}}.
Some templates will place the page in a maintenance category, which is usually undesired:
Instead of {{citation needed}}, use {{fake citation needed}}.
Some templates may have error checking that places the page in a maintenance category. Suppress the category as possible:
Plantilya:Cs1 templates can suppress the maintenance category by setting |template doc demo=true.
Limitations
Plantilya:Xtag
If you don't wrap the content of the markup cell in Plantilya:Xtag, then any template markup will not be escaped, it will be expanded.
This example shows the markup for {{tl|tag}}:
Renders as
Expected renderingProblema sa Lua: expandTemplate: template "format item" does not exist.
HTML entities
HTML entities are parsed in the markup cell:
Nowikied markup shows as
Expected markupProblema sa Lua: expandTemplate: template "format item" does not exist.
To work around this, replace the & with & thus &nbsp; will show as
Examples
Simple
Markup
Renders asProblema sa Lua: expandTemplate: template "format item" does not exist.