⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 618-622.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:
<HTML>

<HEAD>

<TITLE>Special Edition Using Linux, Fourth Edition:Creating Web Documents with HTML</TITLE>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!--ISBN=0789717468//-->

<!--TITLE=Special Edition Using Linux, Fourth Edition//-->

<!--AUTHOR=Jack Tackett//-->

<!--AUTHOR=Jr.//-->

<!--AUTHOR=Steve Burnett//-->

<!--PUBLISHER=Macmillan Computer Publishing//-->

<!--IMPRINT=Que//-->

<!--CHAPTER=32//-->

<!--PAGES=618-622//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="615-618.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="622-625.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

</P>

<P>Table 32.1 provides a quick listing of some of the most common HTML tags for text formatting.

</P>

<TABLE><CAPTION ALIGN=LEFT><B>Table 32.1</B> Selected HTML Text-Formatting Tags

<TR>

<TH COLSPAN="2"><HR>

<TR>

<TH WIDTH="40%" ALIGN="LEFT">Tag

<TH WIDTH="60%" ALIGN="LEFT">Action

<TR>

<TD COLSPAN="2"><HR>

<TR>

<TD><TT>&lt;B&gt;&#133;&lt;/B&gt;</TT>

<TD>Makes text <B>bold</B>.

<TR>

<TD><TT>&lt;BLOCKQUOTE&gt;&#133;&lt;/BLOCKQUOTE&gt;</TT>

<TD>Formats text with left and right indents.

<TR>

<TD VALIGN="TOP"><TT>&lt;FONT&gt;&#133;&lt;/FONT&gt;</TT>

<TD>Controls various aspects of text with attributes&#151;for example, text color (<TT>COLOR=<I>rgb_value</I></TT>) and size (<TT>SIZE=<I>number</I></TT>).

<TR>

<TD><TT>&lt;I&gt;&#133;&lt;/I&gt;</TT>

<TD>Makes text <I>italic</I>.

<TR>

<TD><TT>&lt;PRE&gt;&#133;&lt;/PRE&gt;</TT>

<TD>Leaves text formatting exactly as it appears.

<TR>

<TD><TT>&lt;STRIKE&gt;&#133;&lt;/STRIKE&gt;</TT>

<TD>Formats text as <STRIKE>strikethrough</STRIKE>.

<TR>

<TD><TT>&lt;U&gt;&#133;&lt;/U&gt;</TT>

<TD><U>Underlines</U> text.

<TR>

<TD VALIGN="TOP"><TT>&lt;EM&gt;&#133;&lt;/EM&gt;</TT>

<TD>Logical style; emphasizes text (typically displayed as <I>italic</I>).

<TR>

<TD><TT>&lt;KBD&gt;&#133;&lt;/KBD&gt;</TT>

<TD>Logical style; shows text as a keyboard style (usually displayed in a <TT>monospaced</TT> font).

<TR>

<TD VALIGN="TOP"><TT>&lt;STRONG&gt;&#133;&lt;/STRONG&gt;</TT>

<TD>Logical style; emphasizes text (typically displayed as <B>bold</B>).

<TR>

<TD COLSPAN="2"><HR>

</TABLE>

<P><FONT SIZE="+1"><B>Miscellaneous Text</B></FONT></P>

<P>Two formatting tags that don&#146;t fit in with other tag categories are the <TT>&lt;ADDRESS&gt;</TT> and <TT>&lt;/ADDRESS&gt;</TT> tags. These tags are used to mark addresses, signatures, and so on within a document. Typically, text with this format is placed at the end of a document, following a horizontal rule mark. The exact formatting of <TT>&lt;ADDRESS&gt;</TT> text is determined by the individual Web browser.</P>

<H4 ALIGN="LEFT"><A NAME="Heading11"></A><FONT COLOR="#000077">Organizing Information with Lists</FONT></H4>

<P>Sometimes you need to deliver information that&#146;s logically grouped in some fashion. For example, you might have a list of graphic images to display, or you might want to show a numbered top 10 list. HTML provides several different ways to format and display lists of information. Using lists in HTML is a powerful way to deliver information, because the user&#146;s Web browser formats all the text in the list in a consistent manner. All you have to do is decide how the information fits together.

</P>

<P><FONT SIZE="+1"><B>Displaying Unordered Lists</B></FONT></P>

<P>An <I>unordered list</I> is text displayed separately with a bullet or other formatting character. Each text entry in an unordered list can be several lines long.</P>

<P>Two sets of tags are used to create an unordered list. The <TT>&lt;UL&gt;</TT> and <TT>&lt;/UL&gt;</TT> tags define the beginning and end of the list, and the <TT>&lt;LI&gt;</TT> tag is used to mark each list item. Listing 32.4 shows the HTML source for a simple unordered list. Figure 32.5 shows how Mosaic displays this list.</P>

<P><B>Listing 32.4</B> An Unordered List</P>

<!-- CODE //-->

<PRE>

&lt;HTML&gt;

&lt;HEAD&gt;

&lt;TITLE&gt;An Unordered List&lt;/TITLE&gt;

&lt;/HEAD&gt;

&lt;BODY&gt;



&lt;LI&gt;This is list item 1.

&lt;LI&gt;This is list item 2.

&lt;LI&gt;This is list item 3.

&lt;/UL&gt;

&lt;/BODY&gt;

&lt;/HTML&gt;

</PRE>

<!-- END CODE //-->

<P><A NAME="Fig5"></A><A HREF="javascript:displayWindow('images/32-05.jpg',447,298 )"><IMG SRC="images/32-05t.jpg"></A>

<BR><A HREF="javascript:displayWindow('images/32-05.jpg',447,298)"><FONT COLOR="#000077"><B>FIG. 32.5</B></FONT></A>&nbsp;&nbsp;An unordered list displayed in Mosaic.</P>

<P><FONT SIZE="+1"><B>Presenting Ordered Lists</B></FONT></P>

<P>An <I>ordered list</I> presents list information in numerical order. Each time a new list item is identified, the number of the list item is incremented. Ordered lists are defined by the <TT>&lt;OL&gt;</TT> and <TT>&lt;/OL&gt;</TT> tags, and the same <TT>&lt;LI&gt;</TT> tag used in unordered lists is also used in ordered lists to mark each list item.</P>

<P>Listing 32.5 shows the HTML source for a simple ordered list. Figure 32.6 shows how this list is displayed in Mosaic.</P>

<P><B>Listing 32.5</B> An Ordered List</P>

<!-- CODE //-->

<PRE>

&lt;HTML&gt;

&lt;HEAD&gt;

&lt;TITLE&gt;An Ordered List&lt;/TITLE&gt;

&lt;/HEAD&gt;

&lt;BODY&gt;

&lt;OL&gt;

&lt;LI&gt;This is list item 1.

&lt;LI&gt;This is list item 2.

&lt;LI&gt;This is list item 3.

&lt;/OL&gt;

&lt;/BODY&gt;

&lt;/HTML&gt;

</PRE>

<!-- END CODE //-->

<P><A NAME="Fig6"></A><A HREF="javascript:displayWindow('images/32-06.jpg',447,297 )"><IMG SRC="images/32-06t.jpg"></A>

<BR><A HREF="javascript:displayWindow('images/32-06.jpg',447,297)"><FONT COLOR="#000077"><B>FIG. 32.6</B></FONT></A>&nbsp;&nbsp;An unordered list displayed in Mosaic.</P>

<P><FONT SIZE="+1"><B>Using Definition Lists</B></FONT></P>

<P>Think of how a glossary in a book looks: You typically have each word or term offset by itself and then a paragraph giving its definition. HTML definition (or glossary) lists provide a way to do this with Web pages. A definition list consists of a term&#151;this can be one word or a series of words&#151;followed by a definition. The definition is usually explanatory text.

</P>

<P>Although definition lists are particularly useful for glossaries, you can use them to present any kind of information where you need a title and an explanation. One common use is to make the glossary term a hypertext link to another document and make the definition a description of the linked document. (Creating hypertext links is discussed later in this chapter, so keep this application of a definition list in mind.)</P>

<P>Definition lists require the <TT>&lt;DL&gt;</TT> and <TT>&lt;/DL&gt;</TT> tags to mark the start and end of the list. Rather than use a simple list item tag, definition lists use dual tags: <TT>&lt;DT&gt;</TT> to mark the glossary item and <TT>&lt;DD&gt;</TT> to mark the definition. Listing 32.6 shows the HTML source for a simple definition list. Figure 32.7 shows how this list is displayed in Mosaic.</P>

<P><B>Listing 32.6</B> A Simple Definition List</P>

<!-- CODE //-->

<PRE>

&lt;HTML&gt;

&lt;HEAD&gt;

&lt;TITLE&gt;A Simple Glossary List&lt;/TITLE&gt;

&lt;/HEAD&gt;

&lt;BODY&gt;

&lt;DL&gt;

&lt;DT&gt;Item 1

&lt;DD&gt;This is the definition field for list item 1.

&lt;DT&gt;Item 2

&lt;DD&gt;This is the definition field for list item 2.

&lt;DT&gt;Item 3

&lt;DD&gt;This is the definition field for list item 3.

&lt;/DL&gt;

&lt;/BODY&gt;

&lt;/HTML&gt;

</PRE>

<!-- END CODE //-->

<P><A NAME="Fig7"></A><A HREF="javascript:displayWindow('images/32-07.jpg',641,437 )"><IMG SRC="images/32-07t.jpg"></A>

<BR><A HREF="javascript:displayWindow('images/32-07.jpg',641,437)"><FONT COLOR="#000077"><B>FIG. 32.7</B></FONT></A>&nbsp;&nbsp; A simple definition list displayed in Mosaic.<P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="615-618.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="622-625.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>





</td>
</tr>
</table>

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -