Paragraphs
A browser will always ignore carraige returns in your HTML code so you needn't worry about how long your lines of text are.
However the <P> tag in HTML will allow you to format your text into paragraphs.
Unlike most standard HTML tags, <P> does not have a closing tag.
Line Breaks
The <BR> tag is used to force a line break. It works similar to the <P> tag, however it simply moves text to the next line.
Horizontal Rules
The <HR> tag produces a horizontal line the width of the browser window. A horizontal rule is useful to separate sections of your document.
For example, many people add a rule at the end of their text before the "address" information.
You can vary the size of the rule (thickness) and width (the percentage of the window covered by the rule).
For example <HR SIZE="2" WIDTH="50%"> will display as:
Images
The <IMG> tag is used to add an image to a page.
The source of the image is described in the SRC attribute.
Simply upload your image to your web server and use the <IMG SRC> tag to point to it.
A border can also be added to an image using the BORDER attribute.
Images can be resized, or you can specify their actual size (which is good practice) in your html.
Include the WIDTH and HEIGHT attributes in the IMG tag to specify the image size.
The ALT tag specifies text to be shown instead of an image for those who can not view images.
Some browsers can not display images and this may help the visually impaired to better understand your web page.
The following will specify an image with a border of 2 pixels, a width and height of 100 and 50 pixels respectively and a descriptive text:
<IMG SRC="images\image1.gif" BORDER="2" WIDTH="100" HEIGHT="50" ALT="My Image">
Special Characters
There are three particular ASCII characters that have a special meaning in HTML and therefore cannot be used "as-is" in text:
- the left angle bracket <
- the right angle bracket >
- the ampersand symbol &
The angle brackets are used to indicate the beginning and end of HTML tags, while the ampersand is used to indicate the beginning of an escape sequence.
To use one of these characters in a HTML document, it is necessary to use their escape sequences:
- < is the escape sequence for <
- > is the escape sequence for >
- & is the escape sequence for &
NOTE:
Unlike the rest of HTML, the escape sequences are case sensitive.
|
|