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

📄 rhl56.htm

📁 linux的初学电子书
💻 HTM
📖 第 1 页 / 共 4 页
字号:

s or S

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Search/find in document</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

h

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Window history</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

EXC

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Close current window</FONT>

</TABLE><P>You can select text from the viewing area as though you are in a normal workstation or editor window. Cut and paste into other X Window system windows as usual by pressing the left mouse button to begin selecting text, and then holding the 
button down and dragging. Alternatively, release the left mouse button and use the right mouse button to complete the selection.

<BR>

<P>The Fancy Selections setting under the Options menu causes the paste function to imitate the formatted display in the NCSA Mosaic viewing area.

<BR>

<BR>

<A NAME="E68E435"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>Writing a Hypertext Document</B></FONT></CENTER></H3>

<BR>

<P>Writing a document in HTML is fairly easy if you are a programmer. All you need is a text editor to create and edit a file. From then on, it's a matter of putting the Uniform Resource Locators (URLs) in the file and testing it out.

<BR>

<BR>

<A NAME="E69E555"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>URLs</B></FONT></CENTER></H4>

<BR>

<P>A URL is a way of specifying where a resource exists in the Internet. A resource can be a file, FTP site, database, image, newsgroup, archive, and other such goodies. Pointing to a document means telling your local program, such as Mosaic, the location 
and name of a resource and how to get it. See <A HREF="rhlxa.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhlxa.htm">Appendix A</A>, &quot;Linux FTP Sites and Newsgroups,&quot; for a list of Web pages for Linux.

<BR>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE>Try to edit an existing HTML document instead of writing one from scratch. Save an interesting Web document with the File menu and then edit it with your favorite text editor. You'll save a lot of time writing an HTML document this way.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<P>A URL is composed of three parts:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">action://sitename/pathname</FONT></PRE>

<P>The action part can be at least one of the following. It's not limited to these, of course, but these are the most common ways of getting the files that you see:

<BR>



<TABLE  BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<A NAME="I2"></A>http

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

For HTML documents</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

gopher

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

For starting a gopher session</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

ftp

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

For starting an ftp session</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

file

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

For getting a raw file that may or may not be an HTML file</FONT>

</TABLE><P>A browser program then attempts to use this action on the sitename and pathname in the URL. Given this information, you can also write your own HTML documents.

<BR>

<P>You use text anchors to attach links to an HTML document. An anchor is simply a region of text that is reserved as a pointer to another place. In Mosaic these anchors are displayed as underlined text. Other Web viewers may display a link in a different 
font, a different color, or both. The beauty of HTML is that different viewers can show an HTML document in their own style. You are not limited to one type of display with all viewers.

<BR>

<P>HTML anchors take the following form:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">&lt;a href=&quot;htmlfile&quot;&gt;GoDocument&lt;/a&gt;</FONT></PRE>

<P>In this form, &lt;a and /a&gt; are tags that mark the location pointed to by this HTML anchor. Tags are usually paired, with the ending tag having an extra /. The href token specifies the file to get, and the text between the &gt; and &lt; is what you 
see in dashed boxes. Tags are not case-sensitive, so &lt;a&gt; is equal to &lt;A&gt;.

<BR>

<P>In a hypertext document, you can use the following example to mark a link to the &quot;official&quot; list of WWW servers at CERN:

<BR>

<PRE>

<FONT COLOR="#000080">For List servers at CERN, &lt;a

href=&quot;http://www.w3.org/hypertext/DataSources/WWW/Servers.html&quot;

&gt;GoCERN&lt;/a&gt;</FONT></PRE>

<P>With a browser you see the following line:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">For List servers at CERN, GoCERN.</FONT></PRE>

<P>In this example, the GoCERN text is underlined when it appears on-screen.

<BR>

<P>An HTML document uses tags to specify special areas of the text. The format of an HTML document is loosely described as follows:

<BR>

<PRE>

<FONT COLOR="#000080">&lt;HTML&gt;

&lt;HEAD&gt;

&lt;TITLE&gt;This is a Home Page&lt;/TITLE&gt;

&lt;HEAD&gt;

&lt;BODY&gt;

.... tags ... text .... etc. etc.

&lt;/BODY&gt;

&lt;/HTML&gt;</FONT></PRE>

<P>There can be only one pair of &lt;BODY&gt; and &lt;/BODY&gt; tags in the entire HTML document. These are used to store the text for the HTML document. The &lt;HEAD&gt; and &lt;/HEAD&gt; tags show the title in the heading section of a viewer. You 
generally have only one such pair in an HTML document because the text in the &lt;/HEAD&gt; applies to the whole document.

<BR>

<P>For example, to show the title in an HTML document, use the following tag:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">&lt;TITLE&gt;This is a Home Page For Mosaic!&lt;/TITLE&gt;</FONT></PRE>

<P>Tags are not case-sensitive, and any formatting in between the tags is almost always ignored. So the previous title could also be written as follows:

<BR>

<PRE>

<FONT COLOR="#000080">&lt;TITLE&gt;

This is

a Home

Page

For

Mosaic!

&lt;/TITLE&gt;</FONT></PRE>

<P>Paragraphs in an HTML document are introduced with a &lt;P&gt; tag and ended with a &lt;/P&gt; tag. To break a line in the middle, you use the &lt;BR&gt; tag to add a line break.

<BR>

<P>HTML enables you to use up to six levels of headings, numbered H1 through H6; H1 is the leftmost (highest) heading, and H6 is the lowest heading. To define a heading use the following:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">&lt;H1&gt;heading 1&lt;/H1&gt;</FONT></PRE>

<P>Most Mosaic servers define a different point size for the level of heading you are supposed to be on. Don't skip heading titles when writing a document (for instance, don't use level 5 after level 1). It's not considered a good writing style and does 
not show up well on Mosaic viewers. You won't get any errors, but the document will look sloppy.

<BR>

<P>The following tags can be used to specify how to display the text on a viewer:

<BR>

<PRE>

<FONT COLOR="#000080">&lt;I&gt; &lt;/I&gt; italicize the text in between

&lt;B&gt; &lt;/B&gt; bold face the text in between

&lt;U&gt; &lt;/U&gt; underline the text in between</FONT></PRE>

<P>HTML supports unordered lists of items with the, &lt;LI&gt;, &lt;/LI&gt;, and &lt;/UL&gt; tags. To specify such a list, use the following construct:

<PRE>

<FONT COLOR="#000080">&lt;LI&gt; Eat the cake&lt;/LI&gt;

&lt;LI&gt; Swim with the fish&lt;/LI&gt;

&lt;LI&gt; Start the BBQ &lt;/LI&gt;

&lt;LI&gt; Write a chapter &lt;/LI&gt;

&lt;/UL&gt;</FONT></PRE>

<P>This list is displayed with each item between the &lt;LI&gt; and &lt;/LI&gt; as a bulleted item. Unordered lists are generally used as menu items from which a user can choose an item.

<BR>

<P>To display a numbered list, use an ordered list with &lt;OL&gt; and &lt;/OL&gt; to enclose the list. Technically, you do not need to use the &lt;/LI&gt; for each item, but some browsers may not support it. The previous list could be shown as follows:

<BR>

<PRE>

<FONT COLOR="#000080">&lt;OL&gt;

&lt;LI&gt; Eat the cake&lt;/LI&gt;

&lt;LI&gt; Swim with the fish&lt;/LI&gt;

&lt;LI&gt; Start the BBQ &lt;/LI&gt;

&lt;LI&gt; Write a chapter &lt;/LI&gt;

&lt;/OL&gt;</FONT></PRE>

<P>HTML documents enable you to keep a glossary between &lt;DL&gt; and &lt;/DL&gt; tags. Each glossary item contains a pair of &lt;DT&gt; and &lt;DD&gt; tags. The syntax for the glossary is as follows:

<BR>

<PRE>

<FONT COLOR="#000080">&lt;DL&gt;

&lt;DT&gt;Item&lt;DD&gt;Description of this item in one line.

&lt;DT&gt;Another item &lt;DD&gt;Another One Line Description

&lt;/DL&gt;</FONT></PRE>

<P>The &lt;DT&gt; tag indicates the beginning of an element within a glossary, followed by the description after the &lt;DD&gt; tag. The glossary item is displayed flushed left on a line by itself, followed by the description with a tab in front of it.

<BR>

<P>If you really want to include source listings and the like, you can put the text between &lt;PRE&gt; and &lt;/PRE&gt; tags. The text between these two tags is displayed literally by your browser.

<BR>

<P>Other types of tags supported by Mosaic include the following:

<BR>

<PRE>

<FONT COLOR="#000080">&lt;BR&gt; Produce a line break

&lt;HR&gt; Draw a horizontal line

&lt;EM&gt; &lt;/EM&gt; Emphasize in different font (italics in Mosaic)

&lt;STRONG&gt; &lt;/STRONG&gt; Boldface in Mosaic, another font with other browsers.</FONT></PRE>

<P>You can also place images in your document with the &lt;IMG&gt; tag. For example, the construct

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">&lt;IMG SRC=http://dont.inhale.com/graphics/billy.gif&gt;</FONT></PRE>

<P>gets the image billy.gif from the site dont.inhale.com and has the browser display it for you. (If you want to get a better image editor for HTML documents, try mapedit at sunsite.unc.edu in the /pub/packages/info-systems directory.) If you do not 
specify a full address for the image, the browser uses the current page's directory and site.

<BR>

<P>Images that are declared one after another are placed side by side on the user's screen. You can introduce line breaks with the &lt;BR&gt; or &lt;P&gt; tags. You can also annotate the images with the text ALIGN keyword:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">&lt;IMG SRC=&quot;local.gif&quot; ALIGN=&quot;bottom&quot;&gt; annotation</FONT></PRE>

<P>The keywords for the ALIGN keyword are top, middle, and bottom for aligning the annotation text position. In the previous example, the text will be shown on the bottom of the figure.

<BR>

<P>Some text-based browsers are not capable of displaying images that enable you to specify a special character that is displayed instead of the image. The attribute for this special character is the ALT keyword.

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">&lt;IMG SRC=&quot;local.gif&quot; ALIGN=&quot;middle&quot; ALT=&quot;$&quot;&gt; annotation</FONT></PRE>

<P>This shows a dollar sign where the image would be shown on a graphic browser.

<BR>

<P>You can link images to actions within a link pair. For example, the following action gets you an HTML document by clicking or selecting the figure:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">&lt;A HREF=&quot;bozo.html&quot; &lt;IMG SRC=&quot;clown.gif&quot;&gt; &lt;/A&gt;</FONT></PRE>

<P>That's about all I can put in this space about writing HTML documents. You can always find more interesting documents on the Web as you surf. Save these and see how others do their documents. Most of the information on the Web is very helpful in 
teaching you how to write your own Web documents.

<BR>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE>Avoid the temptation to put large GIF images in your HTML documents. The time needed to download these large GIF files on 14.4 modems (still a limitation for a lot of dialup users) is very long. No one wants to wait 12 minutes or so for a pretty 1MB 
image to come down, when he or she could be looking at other sites with a faster download. Be considerate of your reader's time and keep the sizes of any included images to a reasonable size, say not more than 20KB. You'll still have enough resolution to 
put your pictures in there.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<BR>

<A NAME="E68E436"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>Using Other Browsers</B></FONT></CENTER></H3>

<BR>

<P>If you can use Mosaic, you can use just about any other browser. All browsers are based on the same basic principles of retrieving and displaying a file by checking the type of data in it. Once you know how to navigate using URLs, surfing the Net 
becomes a task of learning how to use the special keys for your browser to help you customize its functions to best suit your needs.

<BR>

<P>There are many browsers already available for surfing the Net. Also, enhancements are being made to those that already have been out for a while. For example, as we go to print the Netscape 2.0 port to Linux is being completed. You will then have access 
to more features, including Sun Microsystems' JAVA language with multimedia support.

<BR>

<BR>

<A NAME="E68E437"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>Summary</B></FONT></CENTER></H3>

<BR>

<P>After a brief introduction to the Web, the following items were covered in this chapter:

<BR>

<UL>

<LI>Where to get Mosaic for Linux, which versions to use, and how to debug common problems in Mosaic.

<BR>

<BR>

<LI>How to install Mosaic on your machine after you have FTPed it.

<BR>

<BR>

<LI>How to surf the Web with Mosaic and use its controls to get around documents.

<BR>

<BR>

<LI>A brief introduction to connecting your Linux node via SLIP to an Internet service provider.

<BR>

<BR>

<LI>Some of the basics on HTML and how to write your own HTML documents for the Web. After reading this chapter, you should be able to write your own files and read HTML documents from other sites.

<BR>

<BR>

</UL>

<P>Happy surfin'.

<P ALIGN=LEFT>

<A HREF="rhl55.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl55.htm" TARGET="_self"><IMG SRC="purprev.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purprev.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Previous Page"></A>

<A HREF="#I0" TARGET="_self"><IMG SRC="purtop.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purtop.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Page Top"></A>

<A HREF="index-1.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/index.htm" TARGET="_self"><IMG SRC="purtoc.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purtoc.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="TOC"></A>

<A HREF="rhl57.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl57.htm" TARGET="_self"><IMG SRC="purnext.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purnext.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Next Page"></A>


</BODY></HTML>



⌨️ 快捷键说明

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