Wikipedia:WikiProject Usability/HTML: Difference between revisions

Content deleted Content added
Dodoïste (talk | contribs)
m | Miscellaneous=uncollapsed}}
SmackBot (talk | contribs)
m Date maintenance tags and general fixes: build 564:
Line 1:
{{cleanup|date=November 2010}}
{{Wikipedia:WikiProject Usability/Navigation menu | Miscellaneous=uncollapsed}}
Wiki supports a subset of [[XHTML]], e.g. '''<br />''' instead of '''<br>'''.
 
Wikipedia allows the use of [[HTML]] directly, and the use of [[Cascading Style Sheets|CSS]] through the <code>style="<var>[…]</var>"</code> and <code>class="<var>[…]</var>"</code> attributes.
 
We believe that:
Line 12:
 
== Why HTML should be used conservatively ==
HTML makes the edit pages hard to read for many users, and on a wiki the readability of the edit page is almost as important as the readability of the page itself, because nobody wants to edit something that they don't understand.
 
Occasionally, such as when you are creating notices, and so on (for which there is no markup defined) HTML/CSS must be used.
Line 25:
These span and div tags need <code>class</code> or <code>style</code> attributes to change the appearance of the page.
:<code><nowiki><span class="noprint" style="color:red;"></nowiki>red text that does not show up when printed<nowiki></span></nowiki></code>
produces
:<span class="noprint" style="color:red;">red text that does not show up when printed</span>.
Where possible, an appropriate class should be used instead of inline styles, to avoid clutter in the edit window and to be able to change the appearance of, for example, all [[Wikipedia:article message boxes|article message boxes]] at once.
 
Line 66:
 
=== List of classes ===
{{mainMain|Wikipedia:Catalogue of CSS classes}}
* syntax: <code>class="<var>class<sub>1</sub></var> <var>class<sub>2</sub></var> …"</code>
* <code>noprint</code> and <code>metadata</code> &ndash; will not get printed onto paper. <code>metadata</code> is more descriptive for actual metadata, like notices, but the intent of noprint is much clearer.