![]() |
HTML QUICK REFERENCE PART 3 - LINKS AND LISTS |
Bill Biega's Information Series |
Basic HTML Body Body Text Character Entitities Elements Fonts Head Headings Horizontal Lines Images Image Formats Image Links Images & Text Links Lists Meta tags More Studies Paragraphs Tables Table Example Tags Explained Test Yourself Text Formats Tips Troubleshooting |
LinksOne of the great benefits of the World Wide Web is the ability to access resources anywhere in the world, almost instantaneously. To take advantage of this you want to be able to link from a place in your Web Page to a related resource, whether 1,000s of miles away or just on your own server.
If the link is to another file on your own server, the URL address becomes much shorter. Links to related files in the same computer or server are called relative links
In the previous chapter, under the heading "Body" there was this sentence:
You can link not only to another file, you may also link to a specific chapter, section or even paragraph. But this requires that you set up "named anchors" at the desired locations. The heading of this section has such a named anchor, as follows:
|
This how this link will appear on your Browser:We stayed at the castle hotel in Rydzyna click on the underlined word and you will be instantly connected to the English language Web site of this hotel in Poland. |
|
ListsLists are a very convenient way of collecting related information, such as a list of states. Within HTML there are three types of lists. Unnumbered ListsThe items are listed without numbers,. Most browsers provide bullets. The coding is:<ul> <li>Washington</li> <li>Oregon</li> <li>California</li> </ul> Ordered or Numbered Lists<ol> <li>Washington</li> <li>Oregon</li> <li>California</li> </ol> The contents of each line item, in any type of list, may be as
Definition ListsA Definition list (DL) includes Items followed by definitions of the item, which are generally indented by the Browser.Here is a simple example: <dl> <dt> Western states</dt> <dd>The Western states are all located along the western coastline of the United States.</dd> |
You may also nest lists, as in this example: <ul> <li>Western states</li> <ul> <li>Washington </li> <li>Oregon</li> <li>California </li> </ul> <li>Mountain states</li> <ul> <li>Idaho</li> <li>Montana</li> </ul> </ul> |
This is how these lists appear in your BrowserUnnumbered
Nested List
Definition list
|
|
Other Text Formatting ElementsHere are some more commonly elements used to format text.BlockQuoteUsed for long quotations and places white margins left and right of the quoted text. Example: Preformatted TextThis preserves all white space, line breaks,tabs etc. Uses fixed width font such as Courier.
<pre> for i = 1 to 10 print i </pre> You must be very careful not to make lines too long, because normal word-wrapping to keep lines within the borders of a page, or of a cell in a table, no longer applies. If you set the text size larger than normal in your Browser, you might have to scroll sideways to read all this page. Try it now! You must use your [Enter] key to create line returns. This is preformatted text. For a normal page, lines should not exceed 80 characters (including spaces). Much shorter inside cells of a table. This line is - 35- characters long. 12345678901234567890123456789012345 Horizontal RulesIt is useful to have a horizontal line to separate sections of your document. DivisionIn order to format a large section of the document, in a different way than other
sections, you may use the "DIVISION" element.
|
This is how these elements look in your Browser
PREFORMATTED TEXT for i = 1 to 10 print i This is preformatted text. For a normal page, lines should not exceed 80 characters (including spaces). Much shorter inside cells of a table. This line is - 35- characters long. 12345678901234567890123456789012345
this is a 50% horizontal rule: Example of a DIVISION Here is some text, and so on
and Here is another paragraph now you must put the The rest of the document continues in normal text, aligned left as usual. |
||
| |||
|
Return to Top of page, or to Web Design Table of Contents.
Return to Home Page.
Last update November 1, 2011 |