Template:Markup HTML Rendered/doc: Difference between revisions

Content deleted Content added
Remove complex use cases, instead referring readers to Template:Markup/doc
padding
 
(7 intermediate revisions by 2 users not shown)
Line 1:
{{Documentation subpage}}
{{TemplateStyles|Template:Markup/styles.css}}
<!-- Categories where indicated at the bottom of this page, please. -->
{{TOC right |limit=2}}
Line 6 ⟶ 7:
 
==Usage==
{{tl|Markup HTML Rendered}}'s arguments should be provided in sets of three. The first of the set should be Wikitext enclosed in {{xtag|nowiki}} tags. The second should be HTML, also enclosed in {{xtag|nowiki}} tags. The third is usually identical to the first, but without {{xtag|nowiki}} tags. The template accepts up to 4039 unnamed parameters, resulting in up to 13 rows of examples.
 
This:
Line 22 ⟶ 23:
===Multiple rows===
{{Markup HTML Rendered
|<nowiki>'''Bold text'''</nowiki>|<nowiki><b>Bold text</b></nowiki>|'''Bold text'''
|<nowiki>''Italic text''</nowiki>|<nowiki><i>Italic text</i></nowiki>|''Italic text''
|<nowiki>[[Internal link]]</nowiki>|<nowiki><a href="https://en.wikipedia.org/wiki/Internal_link">Internal link</a></nowiki>|[[Internal link]]
}}
 
===With custom title and column headers===
{{Markup HTML Rendered
| title=How to write about foxes and dogs in Wikipedia.
|t1=Write this in wikitext|t2=HTML markup|t3=and this will appear in the article.
| Some '''bold''' text | Some <b>bold</b> text | Some '''bold''' text
| The quick brown [[fox]] jumps over the lazy [[dog]]. | The quick brown [[fox]] jumps over the lazy [[dog]].
}}
 
==See also==
* {{tl|Markup2Markup}} for bulletedtwo-column andcode indentedand markup.output
 
* {{tl|Markupv}} for the vertical presentation (above/below) of markup/code and its output.
* {{tl|Automarkup}} does not require to write the code samples twice.
== TemplateData ==
{{TemplateData header}}
Line 54:
"col2headerstyle",
"col2",
"col3headerstyle",
"col3",
"padding",
"col1style",
"col2style",
"col3style",
"codestyle",
"outputstyle",
Line 61 ⟶ 65:
"2",
"3",
"437",
"3938",
"4039"
],
"params": {
"1": {
"description": "row 1, firstWikitext columnmarkup (markup/code)'sfirst contentcolumn).",
"type": "string"
},
"2": {
"description": "row 1, secondHTML columnmarkup (output)'ssecond contentcolumn).",
"type": "string"
},
"3": {
"description": "row 21, firstrendered column's contentoutput (etcthird column).",
"type": "string"
},
"437": {
"description": "row 2, second column's content (etc).",
"type": "string"
},
"39": {
"description": "First column's content in last possible row.",
"type": "string"
},
"4038": {
"description": "Second column's content in last possible row.",
"type": "string"
},
"39": {
"description": "row 2, secondThird column's content (etc)in last possible row.",
"type": "string"
},
Line 114 ⟶ 118:
},
"col1": {
"description": "First column (markup/codeWikitext)'s heading.",
"type": "string",
"default": "\"Markup\""
},
"col2": {
"description": "Second column (outputHTML)'s heading.",
"type": "string",
"default": "\"Renders as\""
},
"col3": {
"description": "Third column (output)'s heading.",
"type": "string",
"default": "\"Renders as\""
Line 144 ⟶ 153:
"col2headerstyle": {
"description": "For CSS styling to amend the appearance of the second column's heading. Overrides (but does not replace) colheaderstyle.",
"type": "string"
},
"col3headerstyle": {
"description": "For CSS styling to amend the appearance of the third column's heading. Overrides (but does not replace) colheaderstyle.",
"type": "string"
},
Line 152 ⟶ 165:
"col1style": {
"label": "Column 1 Style",
"description": "For CSS styles to amend the appearance of the markupWikitext column (e.g. width of the column).",
"example": "width:20em;",
"type": "string",
Line 159 ⟶ 172:
"col2style": {
"label": "Column 2 Style",
"description": "For CSS styles to amend the appearance of the HTML column (e.g. the background colour).",
"example": "background-color:#fff;",
"type": "string",
"default": "none"
},
"col3style": {
"label": "Column 3 Style",
"description": "For CSS styles to amend the appearance of the output column (e.g. the background colour).",
"example": "background-color:#fff;",
"type": "string",
"default": "none"
},
}
"padding": {
"description": "Padding within each cell.",
"example": "0 5px",
"type": "string",
"default": "5px"
}
}
}