Wikipedia:WikiProject Usability/HTML: Difference between revisions

Content deleted Content added
Bot-maru (talk | contribs)
m Robot-assisted disambiguation: CSS
m minor cleanup
Line 1:
This page needs '''cleanup''', Wiki supports a subset of [[XHTML]], e.g. '''<br />''' instead of '''<br>'''.
 
{{TOCright}}
<div style="float:right;">__TOC__</div>
Wikipedia allows the use of [[HTML]] directly, and the use of [[Cascading Style Sheets|CSS]] through the <tt>style="[…]"</tt> and <tt>class="[…]"</tt> elements.
 
Line 10:
** Cross-browser compatability
 
<br style="clear:both;" />
== Why HTML should be used conservatively ==
 
Line 19 ⟶ 18:
== HTML and CSS primer ==
 
HTML is simple to use - just put a pair of tags around some text, e.g. <nowiki><iem>italics</iem></nowiki>, and it will show up <iem>as the tags defined it</iem>. Most HTML elements, like bold (strong, b), italic (em, i), list (li), heading (h1, h2...) and even table (table) have their equivalent in the markup, so should be avoided. The CSS, which you can think of as the "display properties" may be added to the markup itself - this is covered later.
 
There is, however, sometimes a need to define your own type of tag, or "element". There are two html tags to help you do this, span, and div: