Web browers are case-insensitive to all HTML tags, so you may use <B>upper case</B> or <b>lower case</b> inside the tags as you prefer. However, file names (for hyperlinks and images) are case-sensitive, and must appear in quotation marks.
NOTE: The background color of a Web page is set in the <BODY> tag using the option BGCOLOR="#FFFFFF" (replacing FFFFFF with the appropriate 6-hex-digit code for the color you want).
(return to top)
TITLES AND HEADERS:
<title>Quickie Reference for HTML tags</title>
(title only appears once, at top of file)
(return to top)
OTHER FONT CONTROL:
Font sizes: the user of Netscape (or other browser) controls the absolute font sizes (using the ``Options'' pull-down menu, choosing General Preferences), but the Web-page editor can specify relative font sizes analogous to how different size headers are specified.
<font size="-2">size="-2",</font>
<font size="-1">size="-1",</font>
``Normal'' font size,
<font size="+1">size="+1",</font>
<font size="+2">size="+2",</font>
(return to top)
FORMATTING:
<pre> Preformatted text appears just as typed into the HTML file, in typewriter font --- including vertical and horizontal blanks </pre>Otherwise, Netscape does its own formatting of text; shrinking multiple blanks (vertical & horizontal) to a single inter-word space, breaking lines to fit the actual size of the Netscape window (change your window size and see how text gets reformatted!!). However, Netscape grants some control to the editor of the page, who can use any of several control tags. For instance, the page author can force a new paragraph with the tag <p>
One can break a line <br>
without inserting a blank line for a separate paragraph.
The special character
(non-breaking space)
forces an extra
horizontal
space;
use several of them consecutively for
more horizontal space.
<blockquote> A paragraph can be set off as a quotation, getting indentation on both left and right sides, by enclosing it in a pair of ``blockquote'' tags. To be quoted, or not to be quoted, that is the question... </blockquote>
Superscripts, like
8m2 --- 8<i>m</i><sup>2</sup>
footnote17 --- footnote<sup>17</sup>
Subscripts, like
H2O --- H<sub>2</sub>O
log10 x --- log<sub>10</sub> <i>x</i>
(return to top)
IMAGES:
Place an image on the page by inserting an ``image'' tag, with the name of the file of the image (usually a GIF or JPG file), in the appropriate place in the HTML Web file;
Between the img and the src can come any of several options;
It is considerate to include the
ALT option for those
browsers which cannot display,
or have trouble loading, the image.
(Try disabling "Auto Load Images" on
your browser, or use the
browser ``lynx''.)
The full tag for the
nonexistent image at right is
<img ALT="Alternate text" align=right src="alt.gif">
(return to top)
LINKS:
Links are the functional heart of the Web. The words which appear underlined and in color are the LINK TEXT. When the Netscape user clicks on these words then you want a new page to appear; the address of the new page is the ANCHOR.
Everything between the <a href<> and </a<> tags is part of the link ``text'', even if it is an image, or includes an image. In the following hyperlink you can click on either the image or the words. (The color border of the image can be eliminated using the border=0 option in the img tag.)
(return to top)
LISTS:
|
<ul> <li>an item <li>another item <li>and yet another item </ul> |
|
<ol> <li>an item <li>another item <li>and yet another item </ol> |
|
<dl> <dt> This is a term <dd> and this is its definition <dt> This is another term <dd> and this is its definition <dt> And yet another term <dd> and its definition </dl> |
(return to top)
TABLES:
|
<table border=5 cellpadding=8> <tr> <th>Animal</th> <th>Attribute</th> </tr> <tr> <td>Dog</td> <td>Loyal</td> </tr> <tr> <td>Cat</td> <th>Smart but lazy</th> </tr> <tr> <td>Tyrannosaurus Rex</td> <th><i>Hungry!</i></th> </tr> </table> |