Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  





2 Examples  



2.1  Multiple rows  





2.2  With custom title and column headers  







3 See also  





4 TemplateData  














Template:Markup HTML Rendered







Add links
 









Template
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


This template is used to present Wikitext markup side by side with the HTML it produces and the output it renders.

Usage[edit]

{{Markup HTML Rendered}}'s arguments should be provided in sets of three. The first of the set should be Wikitext enclosed in <nowiki> tags. The second should be HTML, also enclosed in <nowiki> tags. The third is usually identical to the first, but without <nowiki> tags. The template accepts up to 39 unnamed parameters, resulting in up to 13 rows of examples.

This:

{{Markup HTML Rendered|<nowiki>'''Bold text'''</nowiki>|<nowiki><b>Bold text</b></nowiki>|'''Bold text'''}}

Produces this:

Wikitext HTML Renders as
'''Bold text'''
<b>Bold text</b>

Bold text

In many cases, the markup for both columns are identical, but there are instances where this may need to differ. For guidance and examples of more complex usage, see Template:Markup/doc.

Examples[edit]

Multiple rows[edit]

Wikitext HTML Renders as
'''Bold text'''
<b>Bold text</b>

Bold text

''Italic text''
<i>Italic text</i>

Italic text

[[Internal link]]
<a href="https://en.wikipedia.org/wiki/Internal_link">Internal link</a>

With custom title and column headers[edit]

How to write about foxes and dogs in Wikipedia.
Write this in wikitext HTML markup HTML markup
Some '''bold''' text
Some <b>bold</b> text

Some bold text

See also[edit]

TemplateData[edit]

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Markup HTML Rendered in articles based on its TemplateData.

TemplateData for Markup HTML Rendered

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
margin-leftmargin-left

To set a margin on the table's lefthand side.

Default
0
Stringoptional
widthwidth

To set the table's overall width.

Default
auto
Stringoptional
stylestyle

For CSS styles amending the table's overall appearance.

Stringoptional
noheadersnoheaders

Set (as e.g. noheaders=on) to suppress the columns' headings and table's title.

Stringoptional
titletitle

Title above table.

Default
none
Stringoptional
colheaderstylecolheaderstyle

For CSS styling to amend the appearance of each column's heading.

Stringoptional
col1headerstylecol1headerstyle

For CSS styling to amend the appearance of the first column's heading. Overrides (but does not replace) colheaderstyle.

Stringoptional
col1col1

First column (Wikitext)'s heading.

Default
"Markup"
Stringoptional
col2headerstylecol2headerstyle

For CSS styling to amend the appearance of the second column's heading. Overrides (but does not replace) colheaderstyle.

Stringoptional
col2col2

Second column (HTML)'s heading.

Default
"Renders as"
Stringoptional
col3headerstylecol3headerstyle

For CSS styling to amend the appearance of the third column's heading. Overrides (but does not replace) colheaderstyle.

Stringoptional
col3col3

Third column (output)'s heading.

Default
"Renders as"
Stringoptional
Column 1 Stylecol1style

For CSS styles to amend the appearance of the Wikitext column (e.g. width of the column).

Default
none
Example
width:20em;
Stringoptional
Column 2 Stylecol2style

For CSS styles to amend the appearance of the HTML column (e.g. the background colour).

Default
none
Example
background-color:#fff;
Stringoptional
Column 3 Stylecol3style

For CSS styles to amend the appearance of the output column (e.g. the background colour).

Default
none
Example
background-color:#fff;
Stringoptional
Markup text stylecodestyle markupstyle

Use CSS style code to change the appearance of content (text) in the Markup column.

Example
white-space: nowrap;
Stringoptional
Output text styleoutputstyle

Use CSS style code to change the appearance of content (text) in the Renders-as column.

Example
white-space: nowrap;
Stringoptional
11

row 1, Wikitext markup (first column).

Stringoptional
22

row 1, HTML markup (second column).

Stringoptional
33

row 1, rendered output (third column).

Stringoptional
3737

First column's content in last possible row.

Stringoptional
3838

Second column's content in last possible row.

Stringoptional
3939

Third column's content in last possible row.

Stringoptional

Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Markup_HTML_Rendered&oldid=1207464545"

Categories: 
Documentation assistance templates
Template namespace templates
Template test cases
Hidden category: 
Templates using TemplateData
 



This page was last edited on 14 February 2024, at 22:20 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki