Cannabis Ruderalis

Content deleted Content added
86.90.98.163 (talk)
→‎Attributes: I thought when it hasn't got a value, setting the name wouldn't work out.
Lakhan Gite (talk | contribs)
Blanked the page
Line 1: Line 1:
{{Wikipedia how to}}
{{Wiki markup}}
{{shortcut|H:HTML|WP:HTML}}

The MediaWiki software allows use of a subset of [[HTML5]] markup [[HTML element|element]]s or tags and their [[HTML attribute|attribute]]s for presentation formatting.{{r|sanitizer}} Many HTML tags may also be included by equivalent [[Help:Wiki markup|wiki markup]] or [[Help:Template|templates]] which are simpler for most editors and less intrusive in the editing window. In normal practice, wiki markup or templates are preferred within articles, but HTML is quite useful for formatting within templates.

==Tutorials==
This help page gives only an overview of allowed markup. For further assistance and detailed specifications:
* [http://www.w3schools.com/html/html5_intro.asp HTML5 Introduction] at w3schools.com

==Attributes==
[[HTML attribute]]s provide additional information about an element and are always specified in the start tag. They are formatted as a name/value pair like <code>name="value"</code>.

Global attributes apply to all tags. Attributes not listed here are not allowed by MediaWiki{{r|sanitizer}}:
* <code>class</code>: one or more classifications to which the element belongs. See [[Wikipedia:Catalogue of CSS classes]].
* <code>dir</code>: text direction— "<code>ltr</code>" (left-to-right), "<code>rtl</code>" (right-to-left) or "<code>auto</code>".
* <code>id</code>: unique identifier for the element.
* <code>lang</code>: primary language for the contents of the element per [[BCP 47]]. The MediaWiki software automatically adds the <code>xml:lang</code> attribute whenever <code>lang</code> is defined, but <code>xml:lang</code> will no longer be passed when included as a separate attribute.
* <code>style</code>: applies CSS styling to the contents of the element.
* <code>title</code>: advisory information associated with the element.

HTML5 microdata attributes apply to all tags:{{r|html5microdata}}
* Any attribute beginning with <code>data-</code>
* <code>itemid</code>
* <code>itemprop</code>
* <code>itemref</code>
* <code>itemscope</code>
* <code>itemtype</code>

<!-- As of 10 January 2013, $wgAllowRdfaAttributes is not enabled, thus the attributes will be stripped
[[RDFa]] attributes:{{r|rdfa}}
* <code>about</code>
* <code>property</code>
* <code>resource</code>
* <code>datatype</code>
* <code>typeof</code>
-->
Other tags such as {{tag|table|o}} support specific attributes— these are listed in the appropriate section.

{{markup
|<nowiki>This is <span style="color:red">red</span> text.</nowiki>
|2=This is <span style="color:red">red</span> text.
}}

The MediaWiki {{sanitizer.php}} does some cleanup on attributes. A best practice is to use the proper syntax.
* Discards attributes not on a whitelist for the given element.
* Turns broken or invalid entities into plaintext.
* Double-quotes all attribute values.
* Attributes without values are given the name as value.
* Double attributes are discarded.
* Unsafe style attributes are discarded.
* Prepends space if there are attributes.

==Elements==
These [[HTML element]]s are supported by the MediaWiki software. This section gives a brief overview of the HTML element, an example, relevant wikimarkup and templates.

===Basic===

==== h1, h2, h3, h4, h5, h6 ====
{{see|Help:Section|MOS:HEAD}}
The {{tag|h1}} through {{tag|h6}} tags are headings for the sections with which they are associated. {{tag|h1|o}} is used for the article title. Headings are styled through CSS and added to the page's [[Help:table of contents|table of contents]].

{{markup
|<nowiki><h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6></nowiki>
|{{fakeheading|sub=1|Heading 1}}
{{fakeheading|sub=2|Heading 2}}
{{fakeheading|sub=3|Heading 3}}
{{fakeheading|sub=4|Heading 4}}
{{fakeheading|sub=5|Heading 5}}
{{fakeheading|sub=6|Heading 6}}
}}

Wikimarkup: surround the text with the appropriate number of equal signs. Headers formatted with wikimarkup add an [edit] link.
<section begin=WIKI_section />
{{markup
|<nowiki>== Heading 2 ==
=== Heading 3 ===
==== Heading 4 ====
===== Heading 5 =====
====== Heading 6 ======
</nowiki>|{{fake heading|Heading 2}}
{{fake heading|sub=3|Heading 3}}
{{fake heading|sub=4|Heading 4}}
{{fake heading|sub=5|Heading 5}}
{{fake heading|sub=6|Heading 6}}
}}
<section end=WIKI_section />
Wiki headers use the following default CSS:
<section begin=HTML_section />
{| class="wikitable"
|-
! Wikimarkup !! [[HTML]] !! Style
|-
| <code>= Heading =</code> || {{tag|h1|o}} || font-size: 1.6em; margin-bottom: .6em; border-bottom: 1px solid #aaa;
|-
| <code>== Heading ==</code> || {{tag|h2|o}} || font-size: 150%; margin-bottom: .6em; border-bottom: 1px solid #aaa; page-break-after: avoid;
|-
| <code>=== Heading ===</code> || {{tag|h3|o}} || font-size: 132%; font-weight: bold; margin-bottom: .3em; page-break-after: avoid;
|-
| <code>==== Heading ====</code> || {{tag|h4|o}} || font-size: 116%; font-weight: bold; margin-bottom: .3em; page-break-after: avoid;
|-
| <code>===== Heading =====</code> || {{tag|h5|o}} || font-size: 105%; font-weight: bold; margin-bottom: .3em; page-break-after: avoid;
|-
| <code>====== Heading ======</code> || {{tag|h6|o}} || font-size: 100%; font-weight: bold; page-break-after: avoid;
|-
|}
<section end=HTML_section />
Templates: {{tl|fake heading}} for use in documentation

====p====
{{tag|p}} tag places content into a separate paragraph.

{{markup
|<nowiki><p>HyperText Markup Language</p><p>HyperText Markup Language</p></nowiki>
|<p>HyperText Markup Language</p><p>HyperText Markup Language</p>
}}

Wikimarkup: Separate paragraphs by a single blank line.

{{markup
|<nowiki>HyperText Markup Language

HyperText Markup Language</nowiki>
|HyperText Markup Language

HyperText Markup Language
}}

====br====
{{see|Wikipedia:Line-break handling|Wikipedia:Don't use line breaks}}
{{tag|br|o}} or {{tag|br|s}} inserts a line break. Both versions of the break are supported by HTML5.

{{markup
|<nowiki>HyperText<br>Markup Language</nowiki>
|HyperText<br>Markup Language
}}

Templates:
* {{tl|break}} adds multiple line breaks.
* {{tl|crlf2}} adds adds a true carriage return and line feed.
* {{tl|-}} adds a break with styling to clear floating elements.
* {{tl|plainlist}} creates an unbulleted list.

====hr====
{{see|WP:LINE}}
{{tag|hr|o}} represents a paragraph-level thematic break and presents as a horizontal rule.

{{markup
|<nowiki><hr></nowiki>
|<hr>
}}

Wikimarkup: use <code>----</code>
{{markup
|<nowiki>----</nowiki>
|{{crlf2}}
----
}}

====comment====
{{see|WP:COMMENT}}
<nowiki><!-- --></nowiki> formats the enclosed text as a hidden comment.

{{markup
|<nowiki>HyperText<!--Markup Language--></nowiki>
|HyperText<!--Markup Language-->
}}

===Formatting===

====abbr====
{{tag|abbr}} creates a tooltip to define an abbreviation or acronym that is displayed on mouse-over.

{{markup
|<nowiki><abbr title="HyperText Markup Language">HTML</abbr></nowiki>
|2=<abbr title="HyperText Markup Language">HTML</abbr>
}}

Support: not supported by IE6 or IE7.

Templates: {{tl|abbr}}; supports Unicode display

====b====
{{see|MOS:BOLD}}
{{tag|b}} formats text stylistically offset from other text (bold) without conveying extra importance.

{{markup
|<nowiki><b>HyperText Markup Language</b></nowiki>
|<b>HyperText Markup Language</b>
}}

Wikimarkup: Use <code><nowiki>'''</nowiki></code> to open and close bold text.

{{markup
|<nowiki>'''HyperText Markup Language'''</nowiki>
|'''HyperText Markup Language'''
}}

====bdi====

{{tag|bdi}} isolates the content from the surrounding text-direction settings.

{{markup
|<nowiki>اليمين إلى اليسارleft to right
</nowiki>
|اليمين إلى اليسارleft to right

|<nowiki>اليمين إلى اليسار<bdi>left to right</bdi></nowiki>
|اليمين إلى اليسار<bdi>left to right</bdi>
}}

Support: Firefox, Chrome

====blockquote====
{{see|MOS:QUOTE}}
{{tag|blockquote}} presents text in an offset block.

{{markup
|<nowiki><blockquote>HyperText Markup Language</blockquote></nowiki>
|<blockquote>HyperText Markup Language</blockquote>
}}

Templates: {{tl|quote}}; supports pre-formatted attribution and source parameters. For other specialized quotation templates, see [[:Category:Quotation templates]].

====cite====
{{tag|cite}} contains the title of a work and by default is formatted in italics. This is a new definition in HTML5— in the previous XML implementation {{tag|cite|o}} was used to contain a citation or a reference to other sources.

{{markup
|<nowiki><cite>HyperText Markup Language</cite></nowiki>
|<cite>HyperText Markup Language</cite>
}}

====code====
{{tag|code}} formats a section of computer code. MediaWiki applies CSS styling to display {{tag|code|o}} in a monospace font.

{{markup
|<nowiki><code>HyperText Markup Language</code></nowiki>
|<code>HyperText Markup Language</code>
}}

Templates: {{tl|code}} uses {{xtag|syntaxhighlight}}.

====data====
{{tag|data}} formats a machine-readable version of contents.

{{markup
|<nowiki><data value="978-0764502149">HTML for Dummies</data></nowiki>
|2=<data value="978-0764502149">HTML for Dummies</data>
}}

Attributes: <code>value</code>

====del====
{{tag|del}} formats deleted text.

{{markup
|<nowiki><del>HyperText Markup Language</del></nowiki>
|<del>HyperText Markup Language</del>
}}

====dfn====
{{tag|dfn}} is used for indicating a definition.

{{markup
|<nowiki><dfn>Definition</dfn></nowiki>
|<dfn>Definition</dfn>
}}

Templates: {{tl|dfn}}

====em====
{{see|MOS:ITALIC}}
{{tag|em}} represents a span of text with emphatic stress.

{{markup
|<nowiki><em>HyperText Markup Language</em></nowiki>
|<em>HyperText Markup Language</em>
}}

Templates: {{tl|em}}

====i====
{{see|MOS:ITALIC}}
{{tag|i}} represents a span of text offset from its surrounding content without conveying any extra emphasis or importance, and for which the conventional typographic presentation is italic text.

{{markup
|<nowiki><i>HyperText Markup Language</i></nowiki>
|<i>HyperText Markup Language</i>
}}

Wikimarkup: Use <code><nowiki>''</nowiki></code> to open and close italic text.
{{markup
|<nowiki>''HyperText Markup Language''</nowiki>
|''HyperText Markup Language''
}}

====ins====
{{tag|ins}} indicates a range of text that has been added. Styled as underlined text. Used on talk pages to indicate refactored text; see [[WP:REDACT]].

{{markup
|<nowiki><ins>HyperText Markup Language</ins></nowiki>
|<ins>HyperText Markup Language</ins>
}}

====kbd====
{{tag|kbd}} indicates user input such as keyboard input or voice commands.

{{markup
|<nowiki>Press <kbd>Enter</kbd></nowiki>
|Press <kbd>Enter</kbd>
}}

Templates:
* {{tl|kbd}} applies gray styling
* {{tl|key press}} renders illustrated keys and keystrokes.

====mark====
{{tag|mark}} represents a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context. Marked text is formatted with a yellow background by default.

{{markup
|<nowiki><mark>HyperText Markup Language</mark></nowiki>
|<mark>HyperText Markup Language</mark>
|<nowiki><mark style="background:lightblue">HyperText Markup Language</mark></nowiki>
|4=<mark style="background:lightblue">HyperText Markup Language</mark>
}}

Support: Not supported by Internet Explorer 8 and below.

====pre====
{{tag|pre}} element represents a block of preformatted text. In MediaWiki, {{xtag|pre}} is actually a parser tag and not HTML, but the function is the same.

{{markup
|<nowiki><pre>HyperText Markup Language</pre></nowiki>
|<pre>HyperText Markup Language</pre>
}}

'''HTML entities'''

{{xtag|pre}} parses [[Character encodings in HTML|HTML entities]]. If you want to escape this, replace <code>&</code> with <code>&amp;amp;</code>.

{{markup
|<nowiki><pre>&amp;amp;</pre></nowiki>
|<pre>&amp;</pre>
|<nowiki><pre>&amp;lt;</pre></nowiki>
|<pre>&lt;</pre>
|<nowiki><pre>&amp;amp;amp;</pre></nowiki>
|<pre>&amp;amp;</pre>
|<nowiki><pre>&amp;amp;lt;</pre></nowiki>
|<pre>&amp;lt;</pre>
}}

Templates:
* {{tl|pre}} wraps text that overflows the page.
* {{tl|pre2}} wraps or uses scrollbox.

====rp, rt, ruby====
{{see|Ruby character}}

{{tag|ruby}} marks spans of phrasing content with ruby annotations.

{{tag|rt}} marks the ruby text component of a ruby annotation.

{{tag|rp}} is used to provide parentheses around a ruby text component of a ruby annotation, to be shown by user agents that don’t support ruby annotations.

{{markup
|<nowiki><ruby>
東<rp>(</rp><rt>とう</rt><rp>)</rp>
京<rp>(</rp><rt>きょう</rt><rp>)</rp>
</ruby></nowiki>
|<ruby>
東<rp>(</rp><rt>とう</rt><rp>)</rp>
京<rp>(</rp><rt>きょう</rt><rp>)</rp>
</ruby>
}}

====s====
{{tag|s}} is used to indicate content that is no longer accurate or relevant and that has been struck from the page. It is not appropriate when indicating document edits; to mark a span of text as having been removed from a document, use {{tag|del|o}}.

{{markup
|<nowiki><s>HyperText Markup Language</s></nowiki>
|<s>HyperText Markup Language</s>
}}

Templates: {{tl|strikethrough}}

====samp====
{{tag|samp}} indicates output from a program or computing system.

{{markup
|<nowiki><samp>HyperText Markup Language</samp></nowiki>
|<samp>HyperText Markup Language</samp>
}}

Templates: {{tl|samp}} applies gray styling

====small====
{{see|WP:FONTSIZE}}
{{tag|small}} format small text.

{{markup
|<nowiki><small>HyperText Markup Language</small></nowiki>
|<small>HyperText Markup Language</small>
}}

====strong====
{{tag|strong}} formats a span of text with strong importance.

{{markup
|<nowiki><strong>HyperText Markup Language</strong></nowiki>
|<strong>HyperText Markup Language</strong>
}}

Templates: {{tl|strong}}

====sub====
{{see|WP:SUBSCRIPT}}
{{tag|sub}} formats a span of text as a subscript.

{{markup
|<nowiki>HyperText <sub>Markup Language</sub></nowiki>
|HyperText <sub>Markup Language</sub>
}}

Templates:
* {{tl|sub}} ({{sub|subscript}} text)
* {{tl|subsub}} ({{subsub|subscript subscript}} text)
* {{tl|ssub}} ({{ssub|subscript, small}} text)
* {{tl|sup}} ({{sup|superscript}} text)
* {{tl|su}} ({{su|p=superscript|b=subscript}} text)
* {{tl|sup sub}} (text{{sup sub|sup|sub}})
* {{tl|e}} (1.23{{e|4}})

====sup====
{{see|WP:SUBSCRIPT}}
{{tag|sup}} formats a span of text as a superscript.

{{markup
|<nowiki>HyperText <sup>Markup Language</sup></nowiki>
|HyperText <sup>Markup Language</sup>
}}

Templates:
* {{tl|sub}} ({{sub|subscript}} text)
* {{tl|subsub}} ({{subsub|subscript subscript}} text)
* {{tl|ssub}} ({{ssub|subscript, small}} text)
* {{tl|sup}} ({{sup|superscript}} text)
* {{tl|su}} ({{su|p=superscript|b=subscript}} text)
* {{tl|sup sub}} (text{{sup sub|sup|sub}})
* {{tl|e}} (1.23{{e|4}})

====time====
{{tag|time}} defines either a time (24 hour clock), or a date in the Gregorian calendar, optionally with a time and a time-zone offset.

{{markup
|<nowiki><time>10:00</time></nowiki>
|<time>10:00</time>
}}

Attributes: <code>datetime</code>

Support: Not supported by Internet Explorer 8 and below.

====u====
{{see|MOS:BADEMPHASIS|MOS:QUOTE}}
{{tag|u}} represents a span of text offset from its surrounding content without conveying any extra emphasis or importance, and for which the conventional typographic presentation is underlining; for example, a span of text in Chinese that is a proper name (a Chinese proper name mark), or span of text that is known to be misspelled.

{{markup
|<nowiki><u>HyperText Markup Language</u></nowiki>
|<u>HyperText Markup Language</u>
}}

Templates: {{tl|underline}}

====var====
{{see|MOS:ITALIC}}
{{tag|var}} formats text in italics to indicate a variable in a mathematical expression or programming context, or placeholder text that the reader is meant to mentally replace with some other literal value.

{{markup
|<nowiki><var>HyperText Markup Language</var></nowiki>
|<var>HyperText Markup Language</var>
}}

Templates:
* {{tl|var}}
* {{tl|varserif}} formatted in italic serif to differentiate characters

===Lists===
{{see|Help:List|MOS:LIST}}

Do not leave blank lines between items in a list unless there is a reason to do so, since this causes the MediaWiki software to interpret each item as beginning a new list.

====dl, dt, dd====
{{hatnote|Do not use ''<strong>;</strong>'' to simply bold a line without defining a value using ''<strong>:</strong>'' as this usage now renders invalid HTML5.}}
{{tag|dl}}, {{tag|dt}} and {{tag|dd}} are used to create a definition list of group names corresponding to values. Group names are in bold and values are indented. Each group <em>must</em> include one or more definitions.

{{markup
|<nowiki><dl>
<dt> Term
<dd> Definition1
<dd> Definition2
<dd> Definition3
<dd> Definition4
</dl></nowiki>
|<dl>
<dt> Term
<dd> Definition1
<dd> Definition2
<dd> Definition3
<dd> Definition4
</dl>
}}

Wikimarkup: {{tag|dt|o}} is created using <code>;</code> while automatically enclosed in {{tag|dl}}. {{tag|dd|o}} is created using <code>:</code> for each value. For a single or first value the <code>:</code> can be placed on the same line after <code>;</code> where subsequent values must be placed on separate lines.

{{markup
|<nowiki>;Term :Definition1
:Definition2
:Definition3
:Definition4</nowiki>
|<dl><!-- this wikimarkup does not render in this template -->
<dt> Term
<dd> Definition1
<dd> Definition2
<dd> Definition3
<dd> Definition4
</dl>
}}

Templates: {{tl|defn}}

====ol, ul, li====
{{tag|ol}} represents an ordered list; {{tag|ul}} represents an unordered list; {{tag|li}} represents a list item within either type of list.

{{markup
|<nowiki><ol>
<li>Item1</li>
<li>Item2</li>
<li>Item3</li>
<li>Item4</li>
</ol></nowiki>
|<ol>
<li>Item1</li>
<li>Item2</li>
<li>Item3</li>
<li>Item4</li>
</ol>
|<nowiki><ul>
<li>Item1</li>
<li>Item2</li>
<li>Item3</li>
<li>Item4</li>
</ul></nowiki>
|<ul>
<li>Item1</li>
<li>Item2</li>
<li>Item3</li>
<li>Item4</li>
</ul>
}}

Wikimarkup: use <code>*</code> for items in an unordered list and <code>#</code> for ordered lists.
{{markup
|1=<nowiki># Item1
# Item2
# Item3
# Item4</nowiki>
|2={{crlf2}}
# Item1
# Item2
# Item3
# Item4
|3=<nowiki>* Item1
* Item2
* Item3
* Item4</nowiki>
|4={{crlf2}}
* Item1
* Item2
* Item3
* Item4
}}

Templates: for a variety of specialized uses, see [[:Category:Wikipedia list formatting templates]].

===Containers===

====div====
{{see|Span and div}}
{{tag|div}} is a generic container for flow content that displays as a block element.

{{markup
|<nowiki>HyperText <div>Markup</div> Language</nowiki>
|HyperText <div>Markup</div> Language
}}

====span====
{{see|Span and div}}
{{tag|span}} is a container for flow content that displays as an inline element.

{{markup
|<nowiki>HyperText <span>Markup</span> Language</nowiki>
|HyperText <span>Markup</span> Language
}}

===Tables===
{{see|Help:Table|MOS:TABLES}}

====table, td, tr====
{{tag|table}} defines a table.

{{tag|tr}} defines a table row.

{{tag|td}} defines a data cell with contents that may include text, links, images, lists, forms, other tables, etc.

{{markup
|<nowiki><table border=1>
<tr>
<td>data</td>
<td>data</td>
</tr>
</table></nowiki>
|2=<table border=1>
<tr>
<td>data</td>
<td>data</td>
</tr>
</table>
}}

Attributes:
* {{tag|table|o}}: <code>border</code>
* {{tag|td|o}}: <code>headers</code>, <code>rowspan</code>, <code>colspan</code>
* The <code>scope</code> attribute is allowed only when using the table header wikimarkup (<code>!</code>).
* Allowed but obsolete or unsupported: <code>abbr</code>, <code>axis</code>, <code>align</code>, <code>charoff</code>, <code>char</code>, <code>valign</code>

====th====
{{tag|th}} defines a table header; styled as centered and bold.

{{markup
|<nowiki><table border="1">
<tr>
<th>Header</th>
<th>Header</th>
</tr>
<tr>
<td>data</td>
<td>data</td>
</tr>
</table></nowiki>
|2=<table border="1">
<tr>
<th>Header</th>
<th>Header</th>
</tr>
<tr>
<td>data</td>
<td>data</td>
</tr>
</table>
}}

====caption====
{{tag|caption}} adds a caption to a table.

{{markup
|<nowiki><table border=1>
<caption>Caption</caption>
<tr>
<td>data</td>
<td>data</td>
</tr>
</table></nowiki>
|2=<table border=1>
<caption>Caption</caption>
<tr>
<td>data</td>
<td>data</td>
</tr>
</table>
}}

====thead, tfoot, tbody====
{{tag|thead|o}}, {{tag|tfoot|o}} and {{tag|tbody|o}} are not supported, but are automatically generated when the page is rendered.

==Obsolete elements==
These elements are now obsolete in HTML5, but still supported by browsers. These tags either have an alternate tag or a template that replaces their function with CSS.

===big===
{{dc|{{tag|big}} (obsolete)}} formats text in a larger font size.

{{markup
|<nowiki><big>HyperText Markup Language</big></nowiki>
|<big>HyperText Markup Language</big>
}}

Templates: {{tl|big}} uses CSS.

===center===
{{for|centering tables|Help:Table#Centering tables}}
{{dc|{{tag|center}} (obsolete)}} is used to center text elements.

{{markup
|<nowiki><center>HyperText Markup Language</center></nowiki>
|<center>HyperText Markup Language</center>
}}

Templates: {{tl|center}} uses CSS.

===font===
{{dc|{{tag|font}} (obsolete)}} is used to set the font size, font face and color of text.

{{markup
|<nowiki><font size="3" face="verdana" color="green">HyperText Markup Language</font></nowiki>
|2=<font size="3" face="verdana" color="green">HyperText Markup Language</font>
}}

Templates: {{tl|font}} uses CSS.

===rb===
{{dc|{{tag|rb}} (obsolete)}} Formerly used to mark base text in a ruby annotation; use {{tag|ruby|o}}.

===strike===
{{dc|{{tag|strike}}}} (obsolete) formats strike-through characters; use {{tag|s|o}} instead.

{{markup
|<nowiki><strike>HyperText Markup Language</strike></nowiki>
|<strike>HyperText Markup Language</strike>
}}

===tt===
{{dc|{{tag|tt}} (obsolete)}} formats text in a fixed-width font. Use {{tag|code|o}}, {{tag|kbd|o}}, {{tag|samp|o}} or {{tag|var|o}} instead.

{{markup
|<nowiki><tt>HyperText Markup Language</tt></nowiki>
|<tt>HyperText Markup Language</tt>
}}

==Unsupported elements==

These elements are not supported, but have equivalent wiki markup. Attempting to use any element not whitelisted by {{sanitizer.php}} will result in the markup showing as plain text.

===a===
{{details|Help:Wiki markup#Links and URLs}}
{{tag|a|o}} is used to create links. Use the <code><nowiki>[[ ]]</nowiki></code> wikimarkup for internal links and <code><nowiki>[ ]</nowiki></code> for external links.

===input===
{{details|mw:Extension:InputBox}}
{{tag|input|o}} is used to create [[Form (HTML)|forms]]. The {{xtag|inputbox}} extension tag is used to create a text box with a button.

==HTML Tidy==
[[HTML Tidy]] is enabled for the English Wikipedia. Tidy parses the MediaWiki output and cleans it up to ensure that valid HTML is rendered. For example, {{tag|br|o}}, {{tag|br|c}}, {{tag|br/|o}}, {{tag|br.|o}} will all render as {{tag|br|s}}. Tidy is not enabled for [[Help:MediaWiki namespace|MediaWiki interface pages]]. Tidy is not perfect, and has been known to introduce errors.

==Exceptions==
In some pages in the MediaWiki namespace (typically the short messages like button labels) HTML is not parsed and tags will be exposed.

User and sitewide CSS and JS pages (see [[Help:User style]]) are interpreted as if inside a {{tag|pre|o}} block.

==Validation==
{{main|Help:Markup validation}}
The MediaWiki software attempts to fix HTML errors, but it does not catch all of them. Where HTML is used, it is helpful to verify it with the [[W3C Markup Validation Service]].

==Parser and extension tags==
{{shortcut|Help:Extension tag|Help:Parser tag}}
The MediaWiki software adds elements that look and act like HTML tags. Parser tags are included in MediaWiki whereas extension tags are added by optional software extensions. Installed tags are listed at [[Special:Version]].

;Parser tags :{{xtag|gallery}}, {{xtag|nowiki}}, {{xtag|pre}}

;Extension tags :{{xtag|categorytree}}, {{xtag|charinsert}}, {{xtag|hiero}}, {{xtag|imagemap}}, {{xtag|inputbox}}, {{xtag|math}}, {{xtag|poem}}, {{xtag|ref}}, {{xtag|references}}, {{xtag|score}}, {{xtag|syntaxhighlight}} (alias {{xtag|source}}), {{xtag|timeline}}

==References==
{{reflist|refs=
<ref name=sanitizer>Allowable elements and attributes are defined in the {{sanitizer.php}} module.</ref>
<ref name=html5microdata>{{cite web |title=The microdata model |work=HTML Living Standard |url=http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html#the-microdata-model}}</ref>
}}

==External links==
* HTML 4.01 specification: [http://www.w3.org/TR/html401/index/elements.html elements] | [http://www.w3.org/TR/html401/index/attributes.html attributes]

{{Help navigation}}
[[Category:Wikipedia editor handbook]]
[[Category:Wikipedia editor help]]

Revision as of 11:48, 20 July 2013

Leave a Reply