Log in Help page Discussion History Go to the site toolbox

Difference between revisions of "Help:HTML in wikitext"

From BluWiki

Line 1: Line 1:
>{{Incomplete}}
+
>>{{Incomplete}}
 
From Wikipedia  [http://en.wikipedia.org/wiki/Help:HTML_in_wikitext] GNU Free Documentation License (GFDL)
 
From Wikipedia  [http://en.wikipedia.org/wiki/Help:HTML_in_wikitext] GNU Free Documentation License (GFDL)
  
Line 5: Line 5:
 
The following [[w:HTML element|HTML element]]s are currently permitted:
 
The following [[w:HTML element|HTML element]]s are currently permitted:
 
          
 
          
{| border="0" cellpadding="5"
+
{| border="0" cellpadding="5"
| valign="top"|
+
| valign="top"|
* [[w:HTML_element#Presentational_markup|<b>]]
+
* [[w:HTML_element#Presentational_markup|<b>]]
* [[w:HTML_element#Presentational_markup|<big>]]
+
* [[w:HTML_element#Presentational_markup|<big>]]
* [[w:HTML_element#Block-level|<blockquote>]]
+
* [[w:HTML_element#Block-level|<blockquote>]]
* [[w:HTML_element#Others|<br>]]
+
* [[w:HTML_element#Others|<br>]]
* [[w:HTML_element#Tables|<caption>]]
+
* [[w:HTML_element#Tables|<caption>]]
* <center>
+
* <center>
* <cite>
+
* <cite>
* [[w:HTML_element#Inline|<code>]]
+
* [[w:HTML_element#Inline|<code>]]
* [[w:HTML_element#Lists|<dd>]]
+
* [[w:HTML_element#Lists|<dd>]]
* [[w:HTML_element#Other_containers|<div>]]
+
* [[w:HTML_element#Other_containers|<div>]]
* [[w:HTML_element#Lists|<dl>]]
+
* [[w:HTML_element#Lists|<dl>]]
* [[w:HTML_element#Lists|<dt>]]
+
* [[w:HTML_element#Lists|<dt>]]
* [[w:HTML_element#Inline|<em>]]
+
* [[w:HTML_element#Inline|<em>]]
* [[w:HTML_element#Presentational_markup|<font>]]
+
* [[w:HTML_element#Presentational_markup|<font>]]
* [[w:HTML_element#Headings|<h1>]]
+
* [[w:HTML_element#Headings|<h1>]]
| valign="top"|
+
| valign="top"|
* [[w:HTML_element#Headings|<h2>]]
+
* [[w:HTML_element#Headings|<h2>]]
* [[w:HTML_element#Headings|<h3>]]
+
* [[w:HTML_element#Headings|<h3>]]
* [[w:HTML_element#Headings|<h4>]]
+
* [[w:HTML_element#Headings|<h4>]]
* [[w:HTML_element#Headings|<h5>]]
+
* [[w:HTML_element#Headings|<h5>]]
* [[w:HTML_element#Headings|<h6>]]
+
* [[w:HTML_element#Headings|<h6>]]
* [[w:HTML_element#Block-level|<hr>]]
+
* [[w:HTML_element#Block-level|<hr>]]
* [[w:HTML_element#Presentational_markup|<i>]]
+
* [[w:HTML_element#Presentational_markup|<i>]]
* [[w:HTML_element#Lists|<li>]]
+
* [[w:HTML_element#Lists|<li>]]
* [[w:HTML_element#Lists|<ol>]]
+
* [[w:HTML_element#Lists|<ol>]]
* [[w:HTML_element#Block-level|<p>]]
+
* [[w:HTML_element#Block-level|<p>]]
* [[w:HTML_element#Block-level|<pre>]]
+
* [[w:HTML_element#Block-level|<pre>]]
* [http://www.w3.org/TR/1999/WD-ruby-19990322/ <rb>]
+
* [http://www.w3.org/TR/1999/WD-ruby-19990322/ <rb>]
* [http://www.w3.org/TR/1999/WD-ruby-19990322/ <rp>]
+
* [http://www.w3.org/TR/1999/WD-ruby-19990322/ <rp>]
* [http://www.w3.org/TR/1999/WD-ruby-19990322/ <rt>]
+
* [http://www.w3.org/TR/1999/WD-ruby-19990322/ <rt>]
* [http://www.w3.org/TR/1999/WD-ruby-19990322/ <ruby>]
+
* [http://www.w3.org/TR/1999/WD-ruby-19990322/ <ruby>]
| valign="top"|
+
| valign="top"|
* [[w:HTML_element#Presentational_markup|<s>]]
+
* [[w:HTML_element#Presentational_markup|<s>]]
* [[w:HTML_element#Presentational_markup|<small>]]
+
* [[w:HTML_element#Presentational_markup|<small>]]
* [[w:HTML_element#Presentational_markup|<strike>]]
+
* [[w:HTML_element#Presentational_markup|<strike>]]
* [[w:HTML_element#Inline|<strong>]]
+
* [[w:HTML_element#Inline|<strong>]]
* [[w:HTML_element#Inline|<sub>]]
+
* [[w:HTML_element#Inline|<sub>]]
* [[w:HTML_element#Inline|<sup>]]
+
* [[w:HTML_element#Inline|<sup>]]
* [[w:HTML_element#Tables|<table>]]
+
* [[w:HTML_element#Tables|<table>]]
* [[w:HTML_element#Tables|<td>]]
+
* [[w:HTML_element#Tables|<td>]]
* [[w:HTML_element#Tables|<th>]]
+
* [[w:HTML_element#Tables|<th>]]
* [[w:HTML_element#Tables|<tr>]]
+
* [[w:HTML_element#Tables|<tr>]]
* [[w:HTML_element#Presentational_markup|<tt>]]
+
* [[w:HTML_element#Presentational_markup|<tt>]]
* [[w:HTML_element#Presentational_markup|<u>]]
+
* [[w:HTML_element#Presentational_markup|<u>]]
* [[w:HTML_element#Lists|<ul>]]
+
* [[w:HTML_element#Lists|<ul>]]
* [[w:HTML_element#Inline|<var>]]
+
* [[w:HTML_element#Inline|<var>]]
* [[w:HTML_element#Others|<!-- ... -->]]
+
* [[w:HTML_element#Others|<!-- ... -->]]
 
|}
 
|}
  
Line 64: Line 64:
 
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.
 
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.
  
<pre>
+
<pre>
 
         /* private */ function removeHTMLtags( $text )
 
         /* private */ function removeHTMLtags( $text )
 
         {
 
         {
                 wfProfileIn( "OutputPage::removeHTMLtags" );
+
                 wfProfileIn( "OutputPage::removeHTMLtags" );
 
                 $htmlpairs = array( # Tags that must be closed
 
                 $htmlpairs = array( # Tags that must be closed
                         "b", "i", "u", "font", "big", "small", "sub", "sup", "h1",
+
                         "b", "i", "u", "font", "big", "small", "sub", "sup", "h1",
                         "h2", "h3", "h4", "h5", "h6", "cite", "code", "em", "s",
+
                         "h2", "h3", "h4", "h5", "h6", "cite", "code", "em", "s",
                         "strike", "strong", "tt", "var", "div", "center",
+
                         "strike", "strong", "tt", "var", "div", "center",
                         "blockquote", "ol", "ul", "dl", "table", "caption", "pre",
+
                         "blockquote", "ol", "ul", "dl", "table", "caption", "pre",
                         "ruby", "rt" , "rb" , "rp"
+
                         "ruby", "rt" , "rb" , "rp"
 
                 );
 
                 );
 
                 $htmlsingle = array(
 
                 $htmlsingle = array(
                         "br", "p", "hr", "li", "dt", "dd"
+
                         "br", "p", "hr", "li", "dt", "dd"
 
                 );
 
                 );
 
                 $htmlnest = array( # Tags that can be nested--??
 
                 $htmlnest = array( # Tags that can be nested--??
                         "table", "tr", "td", "th", "div", "blockquote", "ol", "ul",
+
                         "table", "tr", "td", "th", "div", "blockquote", "ol", "ul",
                         "dl", "font", "big", "small", "sub", "sup"
+
                         "dl", "font", "big", "small", "sub", "sup"
 
                 );
 
                 );
 
                 $tabletags = array( # Can only appear inside table
 
                 $tabletags = array( # Can only appear inside table
                         "td", "th", "tr"
+
                         "td", "th", "tr"
 
                 );
 
                 );
  
Line 90: Line 90:
  
 
                 $htmlattrs = array( # Allowed attributes--no scripting, etc.
 
                 $htmlattrs = array( # Allowed attributes--no scripting, etc.
                         "title", "align", "lang", "dir", "width", "height",
+
                         "title", "align", "lang", "dir", "width", "height",
                         "bgcolor", "clear", /* BR */ "noshade", /* HR */
+
                         "bgcolor", "clear", /* BR */ "noshade", /* HR */
                         "cite", /* BLOCKQUOTE, Q */ "size", "face", "color",
+
                         "cite", /* BLOCKQUOTE, Q */ "size", "face", "color",
                         /* FONT */ "type", "start", "value", "compact",
+
                         /* FONT */ "type", "start", "value", "compact",
 
                         /* For various lists, mostly deprecated but safe */
 
                         /* For various lists, mostly deprecated but safe */
                         "summary", "width", "border", "frame", "rules",
+
                         "summary", "width", "border", "frame", "rules",
                         "cellspacing", "cellpadding", "valign", "char",
+
                         "cellspacing", "cellpadding", "valign", "char",
                         "charoff", "colgroup", "col", "span", "abbr", "axis",
+
                         "charoff", "colgroup", "col", "span", "abbr", "axis",
                         "headers", "scope", "rowspan", "colspan", /* Tables */
+
                         "headers", "scope", "rowspan", "colspan", /* Tables */
                         "id", "class", "name", "style" /* For CSS */
+
                         "id", "class", "name", "style" /* For CSS */
 
                 );
 
                 );
</pre>
+
</pre>
  
E.g., element "a" is not allowed, and the wikitext
+
E.g., element "a" is not allowed, and the wikitext
  
<a href="<nowiki>http://meta.wikimedia.org/wiki/Main_Page</nowiki>">Main Page</a>
+
<a href="<nowiki>http://meta.wikimedia.org/wiki/Main_Page</nowiki>">Main Page</a>
  
 
produces the HTML code
 
produces the HTML code
  
<a href="<nowiki>http://meta.wikimedia.org/wiki/Main_Page</nowiki>">Main Page</a>
+
<a href="<nowiki>http://meta.wikimedia.org/wiki/Main_Page</nowiki>">Main Page</a>
  
 
which renders as the wikitext, not working as a link.
 
which renders as the wikitext, not working as a link.
Line 115: Line 115:
 
==Span==
 
==Span==
  
<code><nowiki><span></nowiki></code>, 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:
+
<code><nowiki><span></nowiki></code>, 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:
  
  <nowiki>This is <span style="color:red">red</span> text.</nowiki>
+
  <nowiki>This is <span style="color:red">red</span> text.</nowiki>
 
   
 
   
  <nowiki>This is <span id="randomfooid">identified</span> text.</nowiki>
+
  <nowiki>This is <span id="randomfooid">identified</span> text.</nowiki>
 
   
 
   
  <nowiki>This is <span class="importantmessage">classed</span> text.</nowiki>
+
  <nowiki>This is <span class="importantmessage">classed</span> text.</nowiki>
 
produces:
 
produces:
  
<blockquote>
+
<blockquote>
  
This is <span style="color:red">red</span> text.
+
This is <span style="color:red">red</span> text.
  
This is <span id="randomfooid">identified</span> text.
+
This is <span id="randomfooid">identified</span> text.
  
This is <span class="importantmessage">classed</span> text.
+
This is <span class="importantmessage">classed</span> text.
  
</blockquote>
+
</blockquote>
  
 
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.
 
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, <strong><nowiki><strong></nowiki></strong> (which can be classed, identified, and styled, as well) to indicate an important piece of text, or <em><nowiki><em></nowiki></em> (subject to the same things as strong) to indicate an emphasized piece of text. For instance, the above might be better reformulated as
+
Note that in most cases, one can use a more descriptive tag, for instance, <strong><nowiki><strong></nowiki></strong> (which can be classed, identified, and styled, as well) to indicate an important piece of text, or <em><nowiki><em></nowiki></em> (subject to the same things as strong) to indicate an emphasized piece of text. For instance, the above might be better reformulated as
  
  <nowiki>This is <em style="color:red;font-style:normal">red</em> text.</nowiki>
+
  <nowiki>This is <em style="color:red;font-style:normal">red</em> text.</nowiki>
  
<blockquote>This is <em style="color:red;font-style:normal">red</em> text.</blockquote>
+
<blockquote>This is <em style="color:red;font-style:normal">red</em> text.</blockquote>
  
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 <em>emphasized text</em>.
+
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 <em>emphasized text</em>.
  
Using {{timc|H:title}}, <nowiki>"a height of {{h:title|6.1 km|20000 ft}} above sea level"</nowiki> gives "a height of {{h:title|6.1 km|20000 ft}} above sea level" (note the hover box over "20000 ft").
+
Using {{timc|H:title}}, <nowiki>"a height of {{h:title|6.1 km|20000 ft}} above sea level"</nowiki> gives "a height of {{h:title|6.1 km|20000 ft}} above sea level" (note the hover box over "20000 ft").
  
 
==Font==
 
==Font==
  
''Note: This element is [[w:Deprecation|deprecate]]d (should not be used) in favor of [[#Span|<nowiki><span></nowiki>]].''
+
''Note: This element is [[w:Deprecation|deprecate]]d (should not be used) in favor of [[#Span|<nowiki><span></nowiki>]].''
  
 
For some attributes, like color, one can also use
 
For some attributes, like color, one can also use
  
<pre>
+
<pre>
a <font style="color: red">red</font> word
+
a <font style="color: red">red</font> word
</pre>
+
</pre>
  
 
or
 
or
  
<pre>
+
<pre>
a <font color=red>red</font> word.
+
a <font color=red>red</font> word.
</pre>
+
</pre>
  
 
giving
 
giving
  
a <font style="color: red">red</font> word
+
a <font style="color: red">red</font> word
  
a <font color=red>red</font> word
+
a <font color=red>red</font> word
  
 
==Div==
 
==Div==
  
E.g. to assign the class "red" to a text one can put
+
E.g. to assign the class "red" to a text one can put
  
  <div class="red">example text</div>
+
  <div class="red">example text</div>
  
which gives <div class="red">example text</div> which is in red if the css line
+
which gives <div class="red">example text</div> which is in red if the css line
  
 
  .red {color:red}
 
  .red {color:red}
Line 182: Line 182:
 
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.).
 
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 ".red {color:red}", so one cannot refer to "the red text above", etc.
+
Note that many readers will not have their own css with such lines as ".red {color:red}", so one cannot refer to "the red text above", etc.
  
 
==External links==
 
==External links==
Line 193: Line 193:
  
 
----
 
----
<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;">
+
&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 Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page]=
 
----
 
----
 
=[http://inicagota.co.cc CLICK HERE]=
 
=[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>
 
</div>

Revision as of 23:46, 17 November 2010

>>

Accessories-text-editor.png Incomplete page: please contribute. - BluWiki is unique in that original page authors normally decide who can edit their page. By putting this banner up, the author(s) of this page believe it is incomplete, and is asking for the assistance of others. Please help them by adding useful information to it. You might find more information about what is needed in discussion of this page.

From Wikipedia [1] GNU Free Documentation License (GFDL)

Permitted HTML

The following HTML elements are currently permitted:

The following excerpt from 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 user style css, and allows the tag to be used as link target.

&lt;pre&gt;

       /* private */ function removeHTMLtags( $text )
       {
               wfProfileIn( &quot;OutputPage::removeHTMLtags&quot; );
               $htmlpairs = array( # Tags that must be closed
                       &quot;b&quot;, &quot;i&quot;, &quot;u&quot;, &quot;font&quot;, &quot;big&quot;, &quot;small&quot;, &quot;sub&quot;, &quot;sup&quot;, &quot;h1&quot;,
                       &quot;h2&quot;, &quot;h3&quot;, &quot;h4&quot;, &quot;h5&quot;, &quot;h6&quot;, &quot;cite&quot;, &quot;code&quot;, &quot;em&quot;, &quot;s&quot;,
                       &quot;strike&quot;, &quot;strong&quot;, &quot;tt&quot;, &quot;var&quot;, &quot;div&quot;, &quot;center&quot;,
                       &quot;blockquote&quot;, &quot;ol&quot;, &quot;ul&quot;, &quot;dl&quot;, &quot;table&quot;, &quot;caption&quot;, &quot;pre&quot;,
                       &quot;ruby&quot;, &quot;rt&quot; , &quot;rb&quot; , &quot;rp&quot;
               );
               $htmlsingle = array(
                       &quot;br&quot;, &quot;p&quot;, &quot;hr&quot;, &quot;li&quot;, &quot;dt&quot;, &quot;dd&quot;
               );
               $htmlnest = array( # Tags that can be nested--??
                       &quot;table&quot;, &quot;tr&quot;, &quot;td&quot;, &quot;th&quot;, &quot;div&quot;, &quot;blockquote&quot;, &quot;ol&quot;, &quot;ul&quot;,
                       &quot;dl&quot;, &quot;font&quot;, &quot;big&quot;, &quot;small&quot;, &quot;sub&quot;, &quot;sup&quot;
               );
               $tabletags = array( # Can only appear inside table
                       &quot;td&quot;, &quot;th&quot;, &quot;tr&quot;
               );
               $htmlsingle = array_merge( $tabletags, $htmlsingle );
               $htmlelements = array_merge( $htmlsingle, $htmlpairs );
               $htmlattrs = array( # Allowed attributes--no scripting, etc.
                       &quot;title&quot;, &quot;align&quot;, &quot;lang&quot;, &quot;dir&quot;, &quot;width&quot;, &quot;height&quot;,
                       &quot;bgcolor&quot;, &quot;clear&quot;, /* BR */ &quot;noshade&quot;, /* HR */
                       &quot;cite&quot;, /* BLOCKQUOTE, Q */ &quot;size&quot;, &quot;face&quot;, &quot;color&quot;,
                       /* FONT */ &quot;type&quot;, &quot;start&quot;, &quot;value&quot;, &quot;compact&quot;,
                       /* For various lists, mostly deprecated but safe */
                       &quot;summary&quot;, &quot;width&quot;, &quot;border&quot;, &quot;frame&quot;, &quot;rules&quot;,
                       &quot;cellspacing&quot;, &quot;cellpadding&quot;, &quot;valign&quot;, &quot;char&quot;,
                       &quot;charoff&quot;, &quot;colgroup&quot;, &quot;col&quot;, &quot;span&quot;, &quot;abbr&quot;, &quot;axis&quot;,
                       &quot;headers&quot;, &quot;scope&quot;, &quot;rowspan&quot;, &quot;colspan&quot;, /* Tables */
                       &quot;id&quot;, &quot;class&quot;, &quot;name&quot;, &quot;style&quot; /* For CSS */
               );

&lt;/pre&gt;

E.g., element &quot;a&quot; is not allowed, and the wikitext

&lt;a href=&quot;&lt;nowiki&gt;http://meta.wikimedia.org/wiki/Main_Page&lt;/nowiki&gt;&quot;&gt;Main Page&lt;/a&gt;

produces the HTML code

&amp;amp;lt;a href=&quot;&lt;nowiki&gt;http://meta.wikimedia.org/wiki/Main_Page&lt;/nowiki&gt;&quot;&amp;amp;gt;Main Page&amp;amp;lt;/a&amp;amp;gt;

which renders as the wikitext, not working as a link.

Span

&lt;code&gt;&lt;nowiki&gt;&lt;span&gt;&lt;/nowiki&gt;&lt;/code&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:

&lt;nowiki&gt;This is &lt;span style=&quot;color:red&quot;&gt;red&lt;/span&gt; text.&lt;/nowiki&gt;

&lt;nowiki&gt;This is &lt;span id=&quot;randomfooid&quot;&gt;identified&lt;/span&gt; text.&lt;/nowiki&gt;

&lt;nowiki&gt;This is &lt;span class=&quot;importantmessage&quot;&gt;classed&lt;/span&gt; text.&lt;/nowiki&gt;

produces:

&lt;blockquote&gt;

This is &lt;span style=&quot;color:red&quot;&gt;red&lt;/span&gt; text.

This is &lt;span id=&quot;randomfooid&quot;&gt;identified&lt;/span&gt; text.

This is &lt;span class=&quot;importantmessage&quot;&gt;classed&lt;/span&gt; text.

&lt;/blockquote&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, &lt;strong&gt;&lt;nowiki&gt;&lt;strong&gt;&lt;/nowiki&gt;&lt;/strong&gt; (which can be classed, identified, and styled, as well) to indicate an important piece of text, or &lt;em&gt;&lt;nowiki&gt;&lt;em&gt;&lt;/nowiki&gt;&lt;/em&gt; (subject to the same things as strong) to indicate an emphasized piece of text. For instance, the above might be better reformulated as

&lt;nowiki&gt;This is &lt;em style=&quot;color:red;font-style:normal&quot;&gt;red&lt;/em&gt; text.&lt;/nowiki&gt;

&lt;blockquote&gt;This is &lt;em style=&quot;color:red;font-style:normal&quot;&gt;red&lt;/em&gt; text.&lt;/blockquote&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 &lt;em&gt;emphasized text&lt;/em&gt;.

Using Template:Timc, &lt;nowiki&gt;&quot;a height of 20000 ft above sea level&quot;&lt;/nowiki&gt; gives &quot;a height of 20000 ft above sea level&quot; (note the hover box over &quot;20000 ft&quot;).

Font

Note: This element is deprecated (should not be used) in favor of &lt;nowiki&gt;&lt;span&gt;&lt;/nowiki&gt;.

For some attributes, like color, one can also use

&lt;pre&gt; a &lt;font style=&quot;color: red&quot;&gt;red&lt;/font&gt; word &lt;/pre&gt;

or

&lt;pre&gt; a &lt;font color=red&gt;red&lt;/font&gt; word. &lt;/pre&gt;

giving

a &lt;font style=&quot;color: red&quot;&gt;red&lt;/font&gt; word

a &lt;font color=red&gt;red&lt;/font&gt; word

Div

E.g. to assign the class &quot;red&quot; to a text one can put

&amp;lt;div class=&quot;red&quot;&gt;example text&amp;lt;/div&gt;

which gives &lt;div class=&quot;red&quot;&gt;example text&lt;/div&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 &quot;.red {color:red}&quot;, so one cannot refer to &quot;the red text above&quot;, etc.

External links

Template:H:f


<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;">


Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page


CLICK HERE


</div>



Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page


CLICK HERE


Site Toolbox:

Personal tools
GNU Free Documentation License 1.2

Disclaimers - About BluWiki