Saturday, March 29, 2008

Help!

This is mainly for Oliver, who wanted to know some basic HTML code, for blogs, wikis, etc.
NOTE: this is NOT "forum" BBcode or Wikipedia code.

All tags have beginnings and closings except for images. I'll put TEXT in between formatting tags...

Bold : <b>TEXT</b> or <strong>TEXT</strong>
using strong is highly recommended.

Italics : <i>TEXT</i> or <em>TEXT</em>
using em (emphasis) is highly recommended

Links : <a href="URL">TEXT</a>

Font : <font face="FONTNAME" size="FONTSIZE" >TEXT</a>
the size can be something like 12 or 14 (like in Word) +4, +2, -2, etc (larger or smaller than the standard size) or xx-small, x-small, small, medium, large, x-large, xx-large. You can even just say larger or smaller.
font face name can either be specific or you can type
serif, sans-serif, or monospace (monospaced is plain-text looking like Courier New)

Images : <img src="URL" width="PIXELWIDTH"
height="PIXELHEIGHT" alt="TEXT" />

insert pixel denominations for width and height
the alt attribute is what displays when you roll over it.

Embed : <embed src="URL" width="PIXELWIDTH"
height="PIXELHEIGHT" wmode="transparent"></embed>

you can embed mp3's, flash, etc.
test the width and height...they can be kind of weird

Line Breaks : a line break is a simple </br> wherever you want it

Bulleted List : Begin the list with <ul> and end with </ul>. each bulleted item will be <li>TEXT</li>
To make hierarchies like:

• TEXT
____• TEXT
• TEXT

you type <li>TEXT</li>
and then to make a sub-item add another
<li>TEXT</li> right before the closing </li>
Example: the above example would look like:

<ul>
<li>TEXT
<li>TEXT</li>
</li>
<li>TEXT</li>
</ul>

Tables: Begin with <table width="WIDTH" border="PIXELS" cellspacing="PIXELS" cellpadding="PIXELS"> and end with </table>
Width can be pixels or type 100% to make it fill the entire space.
Rows begin with <tr> and end with </tr>
Each cell in a row is <td>TEXT</td>
Example: two rows, two columns at 100% would be:

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>TEXT</td>
<td>TEXT</td>
</tr>
<tr>
<td>TEXT</td>
<td>TEXT</td>
</tr>
</table>

Padding is the margins of the cell, spacing is how far apart each cell is.
(both are in pixels)
Border is the number of pixels of a line in the border.

No comments: