📄 ch20.htm
字号:
</BLOCKQUOTE>
<BLOCKQUOTE>
<TT><FONT FACE="Courier"> 1 <HTML><BR>
2 <HEAD><TITLE>Using Lists</TITLE><BR>
3 </HEAD><BR>
4 <BODY><P><BR>
5 <P><BR>
6 <H1>Futures Contracts in Sugar</H1><BR>
7 <P><BR>
8 <A HREF="../cgi-bin/testing.pl"> Test</A>
<BR>
9 <A HREF="query.pl"> Test HTML</A>
<BR>
10 <A HREF="../cgi-bin/query.pl"> Test HTML</A>
<BR>
11 <H2>Summary of Contracts available.</H2><BR>
12 <IMG SRC="red-ball-small.gif"> <B>Sugar
Contracts</B><BR> <BR>
13 <IMG SRC="red-ball-small.gif"> <B>Sugar
Options</B><BR><BR>
14 <IMG SRC="red-ball-small.gif"> <B>Combination</B><BR>
<BR>
15 <HR><BR>
16 <H2> Ordered list of particulars </H2><BR>
17 <UL> <BR>
18 <LI> Price per cent move of Sugar prices:
$1120.00<BR>
19 <LI> Appox min. deposit for contract required by broker:
$5000 to $10000.<BR>
20 <LI> Appox min. deposit for option required by broker:
$1500 to $3000.<BR>
21 <LI> Appox commissions cost: $35 to $75<BR>
22</UL><BR>
23 <P> <BR>
24 <H2> Some Detailed Information in Description Lists. </H2>
<BR>
25 <P><BR>
26 <DL><BR>
27 <DT><IMG SRC="yellow-ball.gif"> <B>Risks
with open contracts </B><BR>
28 <DD> One cent move equals $1120 in your profits. Therefore
a 4 cent move<BR>
29 can either make you a handsome profit or break your bank. A
flood in sugar<BR>
30 growing area may cause prices to drop sharply. If you are holding
a long<BR>
31 contract, this drop in price will have to be covered at the
end of the<BR>
32 trading day or your position will be liquidated.<BR>
33 <DT><IMG SRC="yellow-ball.gif"> <B>
Sugar </B><BR>
34 <DD> Options cost a fixed amount of money. However, the
money spent on<BR>
35 an option should be treated like insurance. No matter where
the price<BR>
36 goes your loss will be limited to the price of the option.
Of course,<BR>
37 with limiting risk you are also limiting profits.<BR>
38 <DT><IMG SRC="yellow-ball.gif"> <B>
Combination of both <B><BR>
39 </BODY></HTML></FONT></TT>
</BLOCKQUOTE>
<HR>
<P>
Your browser will show a different font for each header style.
In this listing, we used two heading levels, <TT><FONT FACE="Courier"><H1></FONT></TT>
and <TT><FONT FACE="Courier"><H2></FONT></TT>, lines 5 and
8. The required <TT><FONT FACE="Courier"><TITLE></FONT></TT>
is also shown and terminated with the <TT><FONT FACE="Courier"></TITLE></FONT></TT>
keyword in line 1. The <TT><FONT FACE="Courier"><P></FONT></TT>
tag is used to start a new paragraph in lines 4, 5, and 7, for
example. If the <TT><FONT FACE="Courier"><P></FONT></TT>
tags were not used, the text would follow in one big clump unless
you were beginning a new header or a horizontal line with the
<TT><FONT FACE="Courier"><HR></FONT></TT> tag. See Line
15 where the <TT><FONT FACE="Courier"><HR></FONT></TT> tag
is used to draw a horizontal line.
<P>
Look at lines 12 through 14. Using <TT><FONT FACE="Courier"><BR></FONT></TT>
tags, I have created the list of three items using IMG tags.
<P>
Note how images are stored and displayed within the document with
the <TT><FONT FACE="Courier"><IMG></FONT></TT> tag. Basically,
the IMG tag specifies where an image will be displayed in the
HTML document. The SRC attribute of the IMG tag specifies the
URL for the contents of the image. The URL can be a complete (absolute)
pathname or a relative pathname. An absolute path would describe
the entire URL: <TT>http://www.ikra.com/mydirectory/red-ball-small.gif</TT>,
whereas the relative pathname will assume the default directory
for images on the server and pick the image called <TT><FONT FACE="Courier">red-ball-small.gif</FONT></TT>
from that directory. By using image files, you can enhance the
appearance of items in a list and provide your own bullets. Consider
this reference in line 12:
<BLOCKQUOTE>
<TT><FONT FACE="Courier"><IMG SRC="red-ball-small.gif">
<B>Sugar Contracts</B><BR></FONT></TT>
</BLOCKQUOTE>
<P>
The file <TT><FONT FACE="Courier">red-ball-small.gif</FONT></TT>
is shown next to the text <TT><FONT FACE="Courier">Sugar Contracts</FONT></TT>
using the relative URL scheme.
<P>
There are several more attributes to an IMG tag allowing you to
align text around the image, size the image, provide a mapping
of URLs to go to if the user clicks on a section of the image,
and so on. Be sure to check the references provided in the "HTML,
CGI, and MIME" section for more information on how to use
IMG tags.
<H2><A NAME="FormattingLists"><FONT SIZE=5 COLOR=#FF0000>Formatting
Lists </FONT></A></H2>
<P>
HTML supports the following types of list formats with which you
can show information:
<UL>
<LI><FONT COLOR=#000000>Unnumbered lists (items in </FONT><TT><FONT FACE="Courier"><UL></FONT></TT>
and <TT><FONT FACE="Courier"></UL></FONT></TT> tags) where
the items in a list are not numbered.
<LI><FONT COLOR=#000000>Numbered lists (items in </FONT><TT><FONT FACE="Courier"><OL></FONT></TT>
and <TT><FONT FACE="Courier"></OL></FONT></TT> tags) where
each item in a list is numbered.
<LI><FONT COLOR=#000000>Definition lists (items in </FONT><TT><FONT FACE="Courier"><DT></FONT></TT>
and <TT><FONT FACE="Courier"><DD></FONT></TT> tags) where
each item in the list is a term followed by a descriptive paragraph
that applies to that term.
</UL>
<P>
Items in a list are separated by <TT><FONT FACE="Courier"><LI></FONT></TT>
tags. The <TT><FONT FACE="Courier"></LI></FONT></TT> tag
is not needed to stop one item and start another. In Listing 20.1,
lines 17 to 22 provide an unnumbered list with the use of <TT><FONT FACE="Courier"><UL></FONT></TT>
and <BR>
<TT><FONT FACE="Courier"></UL></FONT></TT> tags. To make
this a numbered list, simply change the <TT><FONT FACE="Courier"><UL></FONT></TT>
and <TT><FONT FACE="Courier"></UL></FONT></TT> pair to an
<TT><FONT FACE="Courier"><OL></FONT></TT> and <TT><FONT FACE="Courier"></OL></FONT></TT>
tag, respectively, and all the items in the list will be numbered.
<P>
A definition list has two items: a <TT><FONT FACE="Courier"><DT>
</FONT></TT>tag with a term and the definition of the term with
<TT><FONT FACE="Courier"><DD></FONT></TT>. The <TT><FONT FACE="Courier"><LI></FONT></TT>
and <TT><FONT FACE="Courier"><DD></FONT></TT> items can
contain multiple paragraphs with the use of the <TT><FONT FACE="Courier"><P></FONT></TT>
tag. Lines 27 through 38 in Listing 20.1 show how to create a
simple definitions list.
<P>
You can even nest lists within lists. Just remember to end each
list completely within the list item of the parent list. See the
sample HTML code in Listing 20.2.
<HR>
<BLOCKQUOTE>
<B>Listing 20.2. Nested lists.<BR>
</B>
</BLOCKQUOTE>
<BLOCKQUOTE>
<TT><FONT FACE="Courier"> 1 <HTML><HEAD><TITLE>Another
Lists Example</TITLE></HEAD><BR>
2 <BODY><BR>
3 <P><H1>This shows Numbered Lists</H1><P>
<BR>
4 Start of List here.<BR>
5 <OL><BR>
6 <LI> Toulouse<BR>
7 <UL><BR>
8 <LI> To Barritz
<BR>
9 <LI> To Bordeaux
<BR>
10 <LI> To Marseille
<BR>
11 <LI> To Paris<BR>
12 </UL><BR>
13 <LI> Paris<BR>
14 <UL><BR>
15 <LI> To Dijon<BR>
16 <LI> To Rennes<BR>
17 <LI> To Toulouse<BR>
18 </UL><BR>
19 <LI> Rennes<BR>
20 <UL><BR>
21 <LI> To Paris<BR>
22 <LI> To Cherbourg
<BR>
23 </UL><BR>
24 <LI> Nice<BR>
25 <UL><BR>
26 <LI> To Digne<BR>
27 <LI> To Menton<BR>
28 </UL><BR>
29 </OL><BR>
30 </BODY><BR>
31 </HTML></FONT></TT>
</BLOCKQUOTE>
<HR>
<P>
The top level numbered list is started at line 5 and ends in line
29. Each item of the numbered list is inserted in lines 6, 13,
19, and 24. Nested lists are shown as unnumbered lists enclosed
in <TT><FONT FACE="Courier"><UL></FONT></TT> and <TT><FONT FACE="Courier"></UL></FONT></TT>
tags in lines 8 to 12, 14 to 18, 20 to 23, and 25 to 28. Each
<TT><FONT FACE="Courier"><UL></FONT></TT> and <TT><FONT FACE="Courier"></UL></FONT></TT>
pair is terminated in the space for each item in the top level
numbered list.
<H2><A NAME="UsingHTMLTags"><FONT SIZE=5 COLOR=#FF0000>Using HTML
Tags</FONT></A></H2>
<P>
The basic set of HTML tags such as the <TT><FONT FACE="Courier"><HEAD></FONT></TT>,
<TT><FONT FACE="Courier"><BODY></FONT></TT>, and <TT><FONT FACE="Courier"><TITLE></FONT></TT>
are almost always supported by all browsers. However, you should
keep in mind that not all tags are supported by all Web browsers.
If a browser does not support a tag, it just ignores it.
<P>
You can emphasize text in the document so that it stands out when
displayed by a browser. For example, to underline text, use <TT><FONT FACE="Courier"><U></FONT></TT>
and <TT><FONT FACE="Courier"></U></FONT></TT> to enclose
the text. For bold text, enclose the text in <TT><FONT FACE="Courier"><B></FONT></TT>
and <TT><FONT FACE="Courier"></B></FONT></TT> tags. For
italics, use <TT><FONT FACE="Courier"><I></FONT></TT> and
<TT><FONT FACE="Courier"></I></FONT></TT>. See the sample
HTML code in Listing 20.3.
<HR>
<BLOCKQUOTE>
<B>Listing 20.3. Using HTML tags to change font style.<BR>
</B>
</BLOCKQUOTE>
<BLOCKQUOTE>
<TT><FONT FACE="Courier"> 1 <HTML><BR>
2 <HEAD><BR>
3 <TITLE> IISTV.htmL </TITLE><BR>
4 </HEAD><BR>
5 <BODY><BR>
6 <Center><H1>Time Change for Islam TV Program</H1></Center>
<BR>
7 <HR><BR>
8 <P><BR>
9 From January 1996, the Islamic Information Service TV
(IISTV)<BR>
10 Program, will be broadcast <b>every Sunday at 9.00 A.M.
<BR>
11 on Channel 67 (KHSH TV)</b> in the <U>Houston Metropolitan
Area</U>.<BR>
12 Islam TV is regularly watched in 5000 homes and is a totally
<BR>
13 viewer supported program and we need your support.<P>
<BR>
14 The program is also carried on the <EM>International
Cable channel</EM><BR>
15 <STRONG>every Saturday at 9:30 AM.</STRONG><BR>
16 <P><BR>
17 For more information or to send contributions, please contact<P>
<BR>
18 <hr><BR>
19 <CENTER><BR>
20 <STRONG><BR>
21 ISGH/IIS-TV
<BR><BR>
22 </STRONG><BR>
23 9336-B
Katy Freeway Suite 314<BR><BR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -