HTMLBasics Log in | Print | Subscribe to this page

ZWiki's TextFormattingRules are useful for formatting simple pages, but there are situations where you may want to do something on a page that requires some knowledge of basic HTML (Hypertext Markup Language). What follows are some possible scenarios where you might need HTML and instructions for using it. For a complete description of HTML 4.0, see the World Wide Web Consortium's (W3) reference at http://www.w3.org/MarkUp/Guide/ .

Creating Line Breaks in a Section of Text

When you want to break a line of text without turning it into a paragraph or a list item, you can use the break tag to end the line. The next line will start immediately below the line ending with the break tag, with no separating blank line.

<br />

Aligning Images Around Text

To get an image to align with text flowing to either the right or left, you have to add an attribute to your image tag. The image tag looks like this:

<img src="uploads/myimage.gif" />

Where the tag name is "img" and the "src" refers to where the image file is located. We need to add to the basic tag the align attribute to describe how the image should behave within the page. To do this we can insert the align value into the image tag and use as its value "left" or "right" to describe where the image should align and how text in the page should respond to it.

<img src="uploads/myimage.gif" align="left" />

Adding Space Around an Image

Sometimes images and text have enough space separating them when you use the align attribute. To correct this you can use another set of attributes with the image tag. These are hspace (horizontal space) and vspace (vertical space). Using these attributes lets you set a value for defining how much space should separate an image from other elements, such as text, within a page.

<img src="uploads/myimage.gif" align="left" hspace="10" vspace="5" />

Creating Tables or Multiple Columns

To create tables within a page or multi-column pages, you can use the table tag set. Simple tables can be created in HTML using three (3) tags:

<table>
<tr>
<td>Column 1</td> <td>Column 2</td>
</tr>
</table>

This page was last edited 5 years ago by harrison. View page history

Powered by Zwiki, Zope, Python, and Mac OSX