Dark Relms Html Codes

All HTML documents you write must include these elements. While some browsers will work without them, omitting them will break others. Don't forget to put a title in!

Required Tags

All HTML documents you write must include these elements. While some browsers will work without them, omitting them will break others. Don't forget to put a title in!

<HTML> </HTML>
Starts and ends every document.
<HEAD> </HEAD>
Header section. Can include information about the document, such as the author or location.
<TITLE> </TITLE>
Document title (shows up in menu bar, usually). Included between the tags.
<BODY>
BGCOLOR= "#rrggbb"
BACKGROUND= "URL"
Start of the actual content of the document. The BGCOLOR tag is Netscape-specific, but is being accepted by other browsers as well. BACKGROUND, tiling an image as the background, should be used very sparingly. rrggbb in the BGCOLOR tag refers to the hexidecimal notation for the colours, where rr is red, gg is green, and bb is blue. Therefore,
is white, while
is black.

Basic Tags

Almost every HTML document will include most of these tags.

<H1> ... <H6> </H1> ... </H6>
Headings- should be used in order. Don't put other tags inside these.
<BR> (no closing tag)</i>
CLEAR=[ALL, LEFT, RIGHT]
Line break. Only use one at a time. CLEAR can be used to assure no images will protrude as specified.
<P> </P> (close is optional)
ALIGN=[LEFT, RIGHT, CENTER]
Paragraph break. Places space between paragraphs.
<HR> (no closing tag)
ALIGN= [LEFT, RIGHT, CENTER] WIDTH= [percentage %, pixels]
Horizontal line. Some browsers will allow you to specify the width of the line in pixels or percentage of the page's width.
<SMALL> </SMALL>
Text size smaller. More acceptable than <FONT SIZE=...>, Which is netscape specific.
<BIG> </BIG>
Text size larger. Same as above.
<CENTER> </CENTER>
Centers text or other elements in the page.

Lists

Lists are useful for organizing information and links. Every list type has an opening and closing tag, with single tags denoting the actual items in the list between.

<OL> </OL>
Ordered List. A list with numbers in front of each item.
<UL> </UL>
Unordered list. A List with a bullet (dot) in front of each item.
<MENU> </MENU>
Menu List. A list with no markers in front of the items.
<LI> (close is optional)
List Item. Used to denote each item in the list types above.
<DL> </DL>
Definition List. Denotes the start and end of a list with a term at the margin, and an indented definition.
<DT> (close is optional)
Definition Term; will be left justified. Doesn't need a
or

after it.

<DD> (close is optional)
The indented definition.

Character Styles-Logical

Logical tags allow the browser to determine how stylized text should be rendered. This is an advantage in that you know that all browsers, including lynx will be able to display your styles, and it also allows the user to specify how they want it to look. This also works the other way- you cannot depend upon a logical tag to deliver a certain style.

Logical tags should only be used one at a time.

<STRONG> </STRONG>
Strong emphasis.
<EM> </EM>
Emphasis.
<CITE> </CITE>
Citation.
<ADDRESS> </ADDRESS>
Address listing.
<CODE> </CODE>
Computer screen output; monospaced.
<DFN> </DFN>
Definition.
<KBD> </KBD>
Keyboard entry example.

Character Styles-Physical

These tags display text in specific manners. Be careful about nesting the tags, as the results will be unpredictable. Note that not all of these tags are supported by all browsers, notably the Underline tag.

<B> </B>
Bold.
<I> </I>
Italic.
<U> </U>
Underlined.
<TT> </TT>
Teletype (monospaced font).

Links

<A HREF="url"> Text </A>
<A HREF="url"> <IMG SRC="url"> </A>
Used to link to another document. The url is the location of the document, and the text is what you want as the highlighted text (or image) to go to it.
<A HREF="#name"> text </A>
Used to link to a marker in the same or a different document; will take the browser to the specific spot of the marker on that page.
<A NAME="name">
Marker referenced above.

Images

All image references begin with <IMG SRC="url">, where url is the location of the image. Don't forget the file extension (usually either .gif or .jpg). This list describes the tags you can place to further define the image's characteristics.

ALT="text"
Alternate text for non-image browsers. If a user is browsing with a text browser (such as Lynx), they will see this instead of an image. Highly recommended. If you don't want Lynx to display | Image |for image tags, include ALT=""
ALIGN=TOP
Aligns first line of text to top of image. Subsequent text flows underneath.
ALIGN=MIDDLE
Aligns first line of text to centre of image. Subsequent text flows underneath.
ALIGN=BOTTOM
Aligns first line of text to bottom of image. Subsequent text flows underneath.
ALIGN=LEFT
Aligns image to left, allows text to flow and wrap around it.
ALIGN=RIGHT
Aligns image to right, allows text to flow beside it.
HEIGHT=xxx, WIDTH=xxx
Tells Netscape the size, in pixels, of the image, so that it can paginate the HTML around the image's area, loading more quickly. Also allows resizing of images.
HSPACE=xx, VSPACE=xx
Leaves empty space (horizontal or vertical) around an image.
BORDER=x
Specifys how much of a border will be drawn around image. Handy for specifying zero, so that no border will be drawn around a linked image (where appropriate)

Hosted by www.Geocities.ws

1