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.

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: 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

+

−

+

−

<pre>

+

−

a <font style="color: red">red</font> word

+

−

</pre>

+

−

+

−

or

+

−

+

−

<pre>

+

−

a <font color=red>red</font> word.

+

−

</pre>

+

−

+

−

giving

+

−

+

−

a <font style="color: red">red</font> word

+

−

+

−

a <font color=red>red</font> word

+

−

+

−

==Div==

+

−

+

−

E.g. to assign the class "red" to a text one can put

+

−

+

−

&lt;div class="red">example text&lt;/div>

+

−

+

−

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

Revision as of 18:23, 10 April 2007

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.