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!
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,
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
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.
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.
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.
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)