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

📄 609-612.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=609-612//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="../ch31/607-608.html">Previous</A></TD>

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

<TD><A HREF="613-615.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<H2><A NAME="Heading1"></A><FONT COLOR="#000077">Chapter 32<BR>Creating Web Documents with HTML

</FONT></H2>

<P><I>by Steve Burnett</I></P>

<DL>

<DT><B><BIG>I</BIG>n this chapter

</B><DT>Understanding HTML

<DT>Working with HTML

<DT>Using Basic HTML Elements

<DT>Understanding HTML Syntax

</DL>

<P>In Chapter 31, &#147;Surfing the Internet with the World Wide Web,&#148; you learned how to access the World Wide Web and were introduced to the various types of information available. You can click hypertext links and jump from place to place as fast as your connection allows. You can see Web pages with snazzy graphics and sound, lists, forms, and all sorts of neat stuff. But how do you actually create a Web page that other Web users can get to? It&#146;s not really as difficult as you might think. All you need is access to a Web server that uses Hypertext Transport Protocol (HTTP) and a set of documents written in Hypertext Markup Language (HTML).

</P>

<P>This chapter looks at HTML to see what&#146;s involved in writing Web pages using HTML.</P>

<H3><A NAME="Heading2"></A><FONT COLOR="#000077">Understanding HTML</FONT></H3>

<P>The Hypertext Markup Language (HTML) is the language used to develop Web pages and documents. HTML isn&#146;t a programming language like C&#43;&#43;, Java, Pascal, or Perl; instead, it&#146;s basically a cross-platform markup language that&#146;s designed to be flexible enough to display text and other elements (such as graphics) on a variety of viewers.

</P>

<P>An HTML document consists of special tags that are embedded in an ASCII document. These tags are interpreted by Web browser programs, which format and display documents.</P>

<BLOCKQUOTE>

<P><FONT SIZE="-1"><HR><B>NOTE:&nbsp;&nbsp;</B>HTML is a subset of Standard Generalized Markup Language (SGML), which is an international standard (ISO 88791) for electronic document exchange. SGML is a meta-language for defining and standardizing the structure of documents. SGML also describes a grammar you can use to design other markup languages. Any valid HTML document is also valid SGML. Like any SGML derived language, HTML&#146;s grammar is described by a Document Type Definition (DTD) file.<HR></FONT>

</BLOCKQUOTE>

<P>HTML tells Web browsers how to display Web documents; however, the format information HTML provides is pretty general. Many different Web browsers are available for the Internet, such as Netscape Navigator, Microsoft Internet Explorer, or NCSA Mosaic. Many run under graphical interfaces such as the X Windows system or MS Windows. Some, such as Lynx, are ANSI browsers and are limited in terms of which graphical characteristics they can display.

</P>

<P>As you write HTML documents, remember that they will look different depending on which browser the reader is using. All available Web browsers try to format HTML documents as properly as possible; however, what you see may not be what someone else using a different browser or even the same browser running under a different operating system sees.</P>

<H3><A NAME="Heading3"></A><FONT COLOR="#000077">Working with HTML</FONT></H3>

<P>As tools for the Web continue to evolve, creating HTML documents keeps getting easier. Many of the new tools hide much of the actual HTML coding from you. All you have to do is write the words, format your document, and save it to an appropriate location. Some browsers, such as Netscape Navigator Gold, include an editor that lets you point and click to create HTML pages. Other point-and-click tools include Microsoft FrontPage, Adobe PageMill, Allaire HomeSite and Macromedia DreamWeaver.

</P>

<P>If you don&#146;t want to use an HTML editor or already have documents you want to put on the Web, there are several software applications you can use to convert word processing, desktop publishing, spreadsheet, or other documents into HTML. Newer versions of software packages, such as Adobe Framemaker, will include HTML as an option when you save a file.</P>

<BLOCKQUOTE>

<P><FONT SIZE="-1"><HR><B>ON THE WEB:&nbsp;&nbsp;</B><BR>The following Web site has lots of conversion software available:<DL>

<DD><A HREF="http://www.yahoo.com/computers_and_internet/software/internet/world_wide_web">http://www.yahoo.com/Computers_and_Internet/Software/Internet/World_Wide_Web</A>

<DD><A HREF="/html_converters/">/HTML_Converters/</A>

</DL>

<HR></FONT>

</BLOCKQUOTE>

<P>At some point, you&#146;ll want to try your hand at creating your own HTML. Although many tools are available to help make writing HTML less tedious, you&#146;ll probably find that they won&#146;t let you do everything you want.

</P>

<P>You&#146;ll also find that HTML is relatively easy to work with. Because HTML is an ASCII-based markup language, all you need is an editor that will let you save files in ASCII format and a Web browser that you can use to view your Web pages as you develop them. You don&#146;t need a network connection to develop Web documents. Any Web browser should let you open a local HTML file and view it as though you had retrieved it from the Internet.</P>

<BLOCKQUOTE>

<P><FONT SIZE="-1"><HR><B>NOTE:&nbsp;&nbsp;</B>You may find that using an HTML editor is useful. Some editors allow you to select the text you want to format and then apply HTML tags from a menu rather than type the tags in yourself. Other editors look more like word processors&#151;you select the text and select the type of formatting you want from a toolbar. In either case, you&#146;ll probably need to edit the HTML directly to get the exact look and feel you want.<HR></FONT>

</BLOCKQUOTE>

<BLOCKQUOTE>

<P><FONT SIZE="-1"><HR><B>ON THE WEB:&nbsp;&nbsp;</B><BR>You can check out some editors from Sausage Software HotDog/HotDog Pro and Macromedia&#146;s at the following URLs (respectively):

<DL>

<DD><A HREF="http://www.sausage.com">http://www.sausage.com</A>

<DD><A HREF="http://www.macromedia.com">http://www.macromedia.com</A>

</DL>

<P>You can find a listing of HTML editors at this address:

</P>

<DL>

<DD><A HREF="http://www.yahoo.com/computers_and_internet/software/internet/">http://www.yahoo.com/Computers_and_Internet/Software/Internet/<DD>World_Wide_Web/HTML_Editors/</A>

</DL>

<HR></FONT>

</BLOCKQUOTE>

<P>Before you go any further into the syntax of HTML, look at a Web page and its HTML source code. Figure 32.1 shows a simple Web page.

</P>

<P><A NAME="Fig1"></A><A HREF="javascript:displayWindow('images/32-01.jpg',480,588 )"><IMG SRC="images/32-01t.jpg"></A>

<BR><A HREF="javascript:displayWindow('images/32-01.jpg',480,588)"><FONT COLOR="#000077"><B>FIG. 32.1</B></FONT></A>&nbsp;&nbsp;A simple HTML page.</P>

<P>Listing 32.1 shows the HTML source for this Web page. Here you&#146;ll see the basic elements of an HTML page.

</P>

<P><B>Listing 32.1</B> Source Code for a Simple HTML Page</P>

<!-- CODE //-->

<PRE>

&lt;HTML&gt;



&lt;HEAD&gt;

   &lt;TITLE&gt;Hello Web!&lt;/TITLE&gt;

&lt;/HEAD&gt;



&lt;BODY&gt;

&lt;H1&gt;Hello!&lt;/H1&gt;

This is the body section of a simple HTML page.

&lt;P&gt;

&lt;IMG src=&#147;example.gif&#148;&gt;



&lt;/BODY&gt;



&lt;/HTML&gt;

</PRE>

<!-- END CODE //-->

<P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="../ch31/607-608.html">Previous</A></TD>

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

<TD><A HREF="613-615.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 + -