Wikipedia:WikiProject Usability/HTML: Difference between revisions

Content deleted Content added
Line 17:
== HTML and CSS primer ==
 
HTML is simple to use - just put a pair of tags around some text, e.g. <nowiki><i>italics</i></nowiki>, and it will show up <i>as the tags defined it</i>. Most HTML elements, like bold (strong, b), italic (em, i), list (li), heading (h1, h2...) and even table (table) have their equivelantequivalent in the markup, so should be avoided. The CSS, which you can think of as the "display attributes" 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:
*The span tag describes inline elements, usually text that is within other text.
**Bold, italic and underline are examples of inline elements.
*The div tag describes block level elements, so portions of text that have the equivelantequivalent of a linebreak before and after them.
**Lists, tables, headings, and paragraphs are examples of block level elements.
 
Line 37:
Before listing attributes, you should get to know how to represent certain values:
*Color may be represented using hex form (#000000 being black, #ff0000 being red, for example), or using names (red, green...)
*Size should be represented using em, px, and % - 1px represents 1 pixel, 10% represents 10 percent the size of 'something', 1em replesentsrepresents one "height of the font used" - if it were used here, the height of this letter "l".
 
==== Basic attributes ====