|
HTML 初学者指南(10) 但要避免包含其他的HTML标注。例如:要在表中嵌套一个标题,使标题以 大号字体显示。 <UL><LI><H1>A large heading</H1>
<UL>
<LI><H2>Something slightly smaller</H2>
</UL>
虽然有的浏览器,如在X Window系统下的 NCSA Mosaic,可以很好地显示这一结构,但其他浏览器如何显示,则很难预料。为了让所有的浏览器能正确显示,应避免使用这些结构。
检查连接
当一个<IMG>标注指向一个不存在的图像是,屏幕会出现一个图像模型,当这样的情况发生时,请检查连接的文件是否存在,或者连接是否正确和文件的存取权限是否允许被读取。
一个较完整的例子
以下是一个较完整的HTML文档: <HEAD>
<TITLE>A Longer Example</TITLE>
</HEAD>
<BODY>
<H1>A Longer Example</H1>
This is a simple HTML document. This is the first
paragraph. <P>
This is the second paragraph, which shows special effects. This is a
word in <I>italics</I>. This is a word in <B>bold</B>.
Here is an in-lined GIF image: <IMG SRC = "myimage.gif">.
<P>
This is the third paragraph, which demonstrates links. Here is
a hypertext link from the word <A HREF = "subdir/myfile.html">foo</A>
to a document called "subdir/myfile.html". (If you
try to follow this link, you will get an error screen.) <P>
<H2>A second-level header</H2>
Here is a section of text that should display as a
fixed-width font: <P>
<PRE>
On the stiff twig up there
Hunches a wet black rook
Arranging and rearranging its feathers in the rain ...
</PRE>
This is a unordered list with two items: <P>
<UL>
<LI> cranberries
<LI> blueberries
</UL>
This is the end of my example document. <P>
<ADDRESS>Me (me@mycomputer.univ.edu)</ADDRESS>
</BODY>
按这里去看例子的显示结果。
其他参考资料
|