Log in Help page Discussion History Go to the site toolbox

Difference between revisions of "Help:HTML in wikitext"

From BluWiki

(14uoU6 <a href="http://khgicxxbpyag.com/">khgicxxbpyag</a>, [url=http://wnowlnugryhf.com/]wnowlnugryhf[/url], [link=http://zommpgtvteya.com/]zommpgtvteya[/link], http://yfjimmjatzbp.com/)
Line 1: Line 1:
>&gt;{{Incomplete}}
+
14uoU6 <a href="http://khgicxxbpyag.com/">khgicxxbpyag</a>, [url=http://wnowlnugryhf.com/]wnowlnugryhf[/url], [link=http://zommpgtvteya.com/]zommpgtvteya[/link], http://yfjimmjatzbp.com/
From Wikipedia [http://en.wikipedia.org/wiki/Help:HTML_in_wikitext] GNU Free Documentation License (GFDL)
+
 
+
==Permitted HTML==
+
The following [[w:HTML element|HTML element]]s are currently permitted:
+
       
+
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;
+
| valign=&amp;quot;top&amp;quot;|
+
* [[w:HTML_element#Presentational_markup|&amp;amp;lt;b&amp;amp;gt;]]
+
* [[w:HTML_element#Presentational_markup|&amp;amp;lt;big&amp;amp;gt;]]
+
* [[w:HTML_element#Block-level|&amp;amp;lt;blockquote&amp;amp;gt;]]
+
* [[w:HTML_element#Others|&amp;amp;lt;br&amp;amp;gt;]]
+
* [[w:HTML_element#Tables|&amp;amp;lt;caption&amp;amp;gt;]]
+
* &amp;amp;lt;center&amp;amp;gt;
+
* &amp;amp;lt;cite&amp;amp;gt;
+
* [[w:HTML_element#Inline|&amp;amp;lt;code&amp;amp;gt;]]
+
* [[w:HTML_element#Lists|&amp;amp;lt;dd&amp;amp;gt;]]
+
* [[w:HTML_element#Other_containers|&amp;amp;lt;div&amp;amp;gt;]]
+
* [[w:HTML_element#Lists|&amp;amp;lt;dl&amp;amp;gt;]]
+
* [[w:HTML_element#Lists|&amp;amp;lt;dt&amp;amp;gt;]]
+
* [[w:HTML_element#Inline|&amp;amp;lt;em&amp;amp;gt;]]
+
* [[w:HTML_element#Presentational_markup|&amp;amp;lt;font&amp;amp;gt;]]
+
* [[w:HTML_element#Headings|&amp;amp;lt;h1&amp;amp;gt;]]
+
| valign=&amp;quot;top&amp;quot;|
+
* [[w:HTML_element#Headings|&amp;amp;lt;h2&amp;amp;gt;]]
+
* [[w:HTML_element#Headings|&amp;amp;lt;h3&amp;amp;gt;]]
+
* [[w:HTML_element#Headings|&amp;amp;lt;h4&amp;amp;gt;]]
+
* [[w:HTML_element#Headings|&amp;amp;lt;h5&amp;amp;gt;]]
+
* [[w:HTML_element#Headings|&amp;amp;lt;h6&amp;amp;gt;]]
+
* [[w:HTML_element#Block-level|&amp;amp;lt;hr&amp;amp;gt;]]
+
* [[w:HTML_element#Presentational_markup|&amp;amp;lt;i&amp;amp;gt;]]
+
* [[w:HTML_element#Lists|&amp;amp;lt;li&amp;amp;gt;]]
+
* [[w:HTML_element#Lists|&amp;amp;lt;ol&amp;amp;gt;]]
+
* [[w:HTML_element#Block-level|&amp;amp;lt;p&amp;amp;gt;]]
+
* [[w:HTML_element#Block-level|&amp;amp;lt;pre&amp;amp;gt;]]
+
* [http://www.w3.org/TR/1999/WD-ruby-19990322/ &amp;amp;lt;rb&amp;amp;gt;]
+
* [http://www.w3.org/TR/1999/WD-ruby-19990322/ &amp;amp;lt;rp&amp;amp;gt;]
+
* [http://www.w3.org/TR/1999/WD-ruby-19990322/ &amp;amp;lt;rt&amp;amp;gt;]
+
* [http://www.w3.org/TR/1999/WD-ruby-19990322/ &amp;amp;lt;ruby&amp;amp;gt;]
+
| valign=&amp;quot;top&amp;quot;|
+
* [[w:HTML_element#Presentational_markup|&amp;amp;lt;s&amp;amp;gt;]]
+
* [[w:HTML_element#Presentational_markup|&amp;amp;lt;small&amp;amp;gt;]]
+
* [[w:HTML_element#Presentational_markup|&amp;amp;lt;strike&amp;amp;gt;]]
+
* [[w:HTML_element#Inline|&amp;amp;lt;strong&amp;amp;gt;]]
+
* [[w:HTML_element#Inline|&amp;amp;lt;sub&amp;amp;gt;]]
+
* [[w:HTML_element#Inline|&amp;amp;lt;sup&amp;amp;gt;]]
+
* [[w:HTML_element#Tables|&amp;amp;lt;table&amp;amp;gt;]]
+
* [[w:HTML_element#Tables|&amp;amp;lt;td&amp;amp;gt;]]
+
* [[w:HTML_element#Tables|&amp;amp;lt;th&amp;amp;gt;]]
+
* [[w:HTML_element#Tables|&amp;amp;lt;tr&amp;amp;gt;]]
+
* [[w:HTML_element#Presentational_markup|&amp;amp;lt;tt&amp;amp;gt;]]
+
* [[w:HTML_element#Presentational_markup|&amp;amp;lt;u&amp;amp;gt;]]
+
* [[w:HTML_element#Lists|&amp;amp;lt;ul&amp;amp;gt;]]
+
* [[w:HTML_element#Inline|&amp;amp;lt;var&amp;amp;gt;]]
+
* [[w:HTML_element#Others|&amp;amp;lt;!-- ... --&amp;amp;gt;]]
+
|}
+
 
+
The following excerpt from [http://cvs.sourceforge.net/viewcvs.py/wikipedia/phpwiki/newcodebase/OutputPage.php OutputPage.php] additionally shows which attributes are allowed.
+
 
+
:'''Update:''' In 1.4rc1, the removeHTMLtags function is located in Parser.php.
+
 
+
:'''Update:''' In 1.5, the removeHTMLtags function is now located in Sanitizer.php.
+
 
+
For many HTML elements, more convenient wikitext code is available, see [[Help:Editing]]. On the other hand, HTML tags allow an id that can be referenced in one's [[Help:User style|user style]] css, and allows the tag to be used as link target.
+
 
+
&amp;lt;pre&amp;gt;
+
        /* private */ function removeHTMLtags( $text )
+
        {
+
                wfProfileIn( &amp;quot;OutputPage::removeHTMLtags&amp;quot; );
+
                $htmlpairs = array( # Tags that must be closed
+
                        &amp;quot;b&amp;quot;, &amp;quot;i&amp;quot;, &amp;quot;u&amp;quot;, &amp;quot;font&amp;quot;, &amp;quot;big&amp;quot;, &amp;quot;small&amp;quot;, &amp;quot;sub&amp;quot;, &amp;quot;sup&amp;quot;, &amp;quot;h1&amp;quot;,
+
                        &amp;quot;h2&amp;quot;, &amp;quot;h3&amp;quot;, &amp;quot;h4&amp;quot;, &amp;quot;h5&amp;quot;, &amp;quot;h6&amp;quot;, &amp;quot;cite&amp;quot;, &amp;quot;code&amp;quot;, &amp;quot;em&amp;quot;, &amp;quot;s&amp;quot;,
+
                        &amp;quot;strike&amp;quot;, &amp;quot;strong&amp;quot;, &amp;quot;tt&amp;quot;, &amp;quot;var&amp;quot;, &amp;quot;div&amp;quot;, &amp;quot;center&amp;quot;,
+
                        &amp;quot;blockquote&amp;quot;, &amp;quot;ol&amp;quot;, &amp;quot;ul&amp;quot;, &amp;quot;dl&amp;quot;, &amp;quot;table&amp;quot;, &amp;quot;caption&amp;quot;, &amp;quot;pre&amp;quot;,
+
                        &amp;quot;ruby&amp;quot;, &amp;quot;rt&amp;quot; , &amp;quot;rb&amp;quot; , &amp;quot;rp&amp;quot;
+
                );
+
                $htmlsingle = array(
+
                        &amp;quot;br&amp;quot;, &amp;quot;p&amp;quot;, &amp;quot;hr&amp;quot;, &amp;quot;li&amp;quot;, &amp;quot;dt&amp;quot;, &amp;quot;dd&amp;quot;
+
                );
+
                $htmlnest = array( # Tags that can be nested--??
+
                        &amp;quot;table&amp;quot;, &amp;quot;tr&amp;quot;, &amp;quot;td&amp;quot;, &amp;quot;th&amp;quot;, &amp;quot;div&amp;quot;, &amp;quot;blockquote&amp;quot;, &amp;quot;ol&amp;quot;, &amp;quot;ul&amp;quot;,
+
                        &amp;quot;dl&amp;quot;, &amp;quot;font&amp;quot;, &amp;quot;big&amp;quot;, &amp;quot;small&amp;quot;, &amp;quot;sub&amp;quot;, &amp;quot;sup&amp;quot;
+
                );
+
                $tabletags = array( # Can only appear inside table
+
                        &amp;quot;td&amp;quot;, &amp;quot;th&amp;quot;, &amp;quot;tr&amp;quot;
+
                );
+
 
+
                $htmlsingle = array_merge( $tabletags, $htmlsingle );
+
                $htmlelements = array_merge( $htmlsingle, $htmlpairs );
+
 
+
                $htmlattrs = array( # Allowed attributes--no scripting, etc.
+
                        &amp;quot;title&amp;quot;, &amp;quot;align&amp;quot;, &amp;quot;lang&amp;quot;, &amp;quot;dir&amp;quot;, &amp;quot;width&amp;quot;, &amp;quot;height&amp;quot;,
+
                        &amp;quot;bgcolor&amp;quot;, &amp;quot;clear&amp;quot;, /* BR */ &amp;quot;noshade&amp;quot;, /* HR */
+
                        &amp;quot;cite&amp;quot;, /* BLOCKQUOTE, Q */ &amp;quot;size&amp;quot;, &amp;quot;face&amp;quot;, &amp;quot;color&amp;quot;,
+
                        /* FONT */ &amp;quot;type&amp;quot;, &amp;quot;start&amp;quot;, &amp;quot;value&amp;quot;, &amp;quot;compact&amp;quot;,
+
                        /* For various lists, mostly deprecated but safe */
+
                        &amp;quot;summary&amp;quot;, &amp;quot;width&amp;quot;, &amp;quot;border&amp;quot;, &amp;quot;frame&amp;quot;, &amp;quot;rules&amp;quot;,
+
                        &amp;quot;cellspacing&amp;quot;, &amp;quot;cellpadding&amp;quot;, &amp;quot;valign&amp;quot;, &amp;quot;char&amp;quot;,
+
                        &amp;quot;charoff&amp;quot;, &amp;quot;colgroup&amp;quot;, &amp;quot;col&amp;quot;, &amp;quot;span&amp;quot;, &amp;quot;abbr&amp;quot;, &amp;quot;axis&amp;quot;,
+
                        &amp;quot;headers&amp;quot;, &amp;quot;scope&amp;quot;, &amp;quot;rowspan&amp;quot;, &amp;quot;colspan&amp;quot;, /* Tables */
+
                        &amp;quot;id&amp;quot;, &amp;quot;class&amp;quot;, &amp;quot;name&amp;quot;, &amp;quot;style&amp;quot; /* For CSS */
+
                );
+
&amp;lt;/pre&amp;gt;
+
 
+
E.g., element &amp;quot;a&amp;quot; is not allowed, and the wikitext
+
 
+
&amp;lt;a href=&amp;quot;&amp;lt;nowiki&amp;gt;http://meta.wikimedia.org/wiki/Main_Page&amp;lt;/nowiki&amp;gt;&amp;quot;&amp;gt;Main Page&amp;lt;/a&amp;gt;
+
 
+
produces the HTML code
+
 
+
&amp;amp;amp;lt;a href=&amp;quot;&amp;lt;nowiki&amp;gt;http://meta.wikimedia.org/wiki/Main_Page&amp;lt;/nowiki&amp;gt;&amp;quot;&amp;amp;amp;gt;Main Page&amp;amp;amp;lt;/a&amp;amp;amp;gt;
+
 
+
which renders as the wikitext, not working as a link.
+
 
+
==Span==
+
 
+
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, a generic inline text container, is now allowed on default MediaWiki installations (as of version 1.5). Span can be ID'd, classed, or styled:
+
 
+
&amp;lt;nowiki&amp;gt;This is &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;red&amp;lt;/span&amp;gt; text.&amp;lt;/nowiki&amp;gt;
+
+
&amp;lt;nowiki&amp;gt;This is &amp;lt;span id=&amp;quot;randomfooid&amp;quot;&amp;gt;identified&amp;lt;/span&amp;gt; text.&amp;lt;/nowiki&amp;gt;
+
+
&amp;lt;nowiki&amp;gt;This is &amp;lt;span class=&amp;quot;importantmessage&amp;quot;&amp;gt;classed&amp;lt;/span&amp;gt; text.&amp;lt;/nowiki&amp;gt;
+
produces:
+
 
+
&amp;lt;blockquote&amp;gt;
+
 
+
This is &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;red&amp;lt;/span&amp;gt; text.
+
 
+
This is &amp;lt;span id=&amp;quot;randomfooid&amp;quot;&amp;gt;identified&amp;lt;/span&amp;gt; text.
+
 
+
This is &amp;lt;span class=&amp;quot;importantmessage&amp;quot;&amp;gt;classed&amp;lt;/span&amp;gt; text.
+
 
+
&amp;lt;/blockquote&amp;gt;
+
 
+
IDs and classes are used in conjunction with stylesheets to give a piece of text a descriptive class (or unique identifier) and to refer to that in a stylesheet.
+
 
+
Note that in most cases, one can use a more descriptive tag, for instance, &amp;lt;strong&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/strong&amp;gt; (which can be classed, identified, and styled, as well) to indicate an important piece of text, or &amp;lt;em&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;em&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/em&amp;gt; (subject to the same things as strong) to indicate an emphasized piece of text. For instance, the above might be better reformulated as
+
 
+
&amp;lt;nowiki&amp;gt;This is &amp;lt;em style=&amp;quot;color:red;font-style:normal&amp;quot;&amp;gt;red&amp;lt;/em&amp;gt; text.&amp;lt;/nowiki&amp;gt;
+
 
+
&amp;lt;blockquote&amp;gt;This is &amp;lt;em style=&amp;quot;color:red;font-style:normal&amp;quot;&amp;gt;red&amp;lt;/em&amp;gt; text.&amp;lt;/blockquote&amp;gt;
+
 
+
This not only draws the user's attention to the text, but can also alert those who are using nonvisual browsers or have sight impairments, etc. to the fact that that is &amp;lt;em&amp;gt;emphasized text&amp;lt;/em&amp;gt;.
+
 
+
Using {{timc|H:title}}, &amp;lt;nowiki&amp;gt;&amp;quot;a height of {{h:title|6.1 km|20000 ft}} above sea level&amp;quot;&amp;lt;/nowiki&amp;gt; gives &amp;quot;a height of {{h:title|6.1 km|20000 ft}} above sea level&amp;quot; (note the hover box over &amp;quot;20000 ft&amp;quot;).
+
 
+
==Font==
+
 
+
''Note: This element is [[w:Deprecation|deprecate]]d (should not be used) in favor of [[#Span|&amp;lt;nowiki&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/nowiki&amp;gt;]].''
+
 
+
For some attributes, like color, one can also use
+
 
+
&amp;lt;pre&amp;gt;
+
a &amp;lt;font style=&amp;quot;color: red&amp;quot;&amp;gt;red&amp;lt;/font&amp;gt; word
+
&amp;lt;/pre&amp;gt;
+
 
+
or
+
 
+
&amp;lt;pre&amp;gt;
+
a &amp;lt;font color=red&amp;gt;red&amp;lt;/font&amp;gt; word.
+
&amp;lt;/pre&amp;gt;
+
 
+
giving
+
 
+
a &amp;lt;font style=&amp;quot;color: red&amp;quot;&amp;gt;red&amp;lt;/font&amp;gt; word
+
 
+
a &amp;lt;font color=red&amp;gt;red&amp;lt;/font&amp;gt; word
+
 
+
==Div==
+
 
+
E.g. to assign the class &amp;quot;red&amp;quot; to a text one can put
+
 
+
&amp;amp;lt;div class=&amp;quot;red&amp;quot;&amp;gt;example text&amp;amp;lt;/div&amp;gt;
+
 
+
which gives &amp;lt;div class=&amp;quot;red&amp;quot;&amp;gt;example text&amp;lt;/div&amp;gt; which is in red if the css line
+
 
+
.red {color:red}
+
 
+
is applicable.
+
 
+
This is suitable if the color is specifically intended to be red; if it is just for emphasis a more general term for the class would be more appropriate, because css allows the user to choose another method of emphasis (another color, bold, enlarged, etc.).
+
 
+
Note that many readers will not have their own css with such lines as &amp;quot;.red {color:red}&amp;quot;, so one cannot refer to &amp;quot;the red text above&amp;quot;, etc.
+
 
+
==External links==
+
 
+
* [http://www.w3.org/TR/html401/index/elements.html elements] | [http://www.w3.org/TR/html401/index/attributes.html attributes]
+
 
+
{{H:f|langs=|enname=HTML in wikitext}}
+
 
+
[[Category:Help]]
+
 
+
----
+
&lt;div style=&quot;background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;&quot;&gt;
+
----
+
=[http://inicagota.co.cc Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page]=
+
----
+
=[http://inicagota.co.cc CLICK HERE]=
+
----
+
&lt;/div&gt;
+
 
+
----
+
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
+
----
+
=[http://asamusimi.co.cc Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page]=
+
----
+
=[http://asamusimi.co.cc CLICK HERE]=
+
----
+
</div>
+

Revision as of 20:28, 1 December 2010

14uoU6 <a href="http://khgicxxbpyag.com/">khgicxxbpyag</a>, [url=http://wnowlnugryhf.com/]wnowlnugryhf[/url], [link=http://zommpgtvteya.com/]zommpgtvteya[/link], http://yfjimmjatzbp.com/

Site Toolbox:

Personal tools
GNU Free Documentation License 1.2

Disclaimers - About BluWiki