|
|
为文中不同部份加上说明,方便日后修改。 这对较复杂或非私人网页尤其重要,它不单是提醒自已,亦提醒你的同事这部分 做什么、那部分做什么。 例子: <!--由这处开始是产品订购表格--> 用作版权声明。 假如你不希望别人使用或复制你的网页,可加上警告字眼。 例子: <!--本文版权为 1998, Creation of Webpage 所拥有,未经许,请勿抄摘--> |
|
| 本来<P>是一围堵标记,标于一段落的头尾,但从 HTML 2.0 开始己不需要</P>作结尾。 <P> 的常用参数: 如:<p align="center"> - align="center"
可选值:right, left, center。 内定值: align="left"
例子: | 原始码 | Here is the text for my paragraph. It does't matter how long it is, how many space are between the words or when I decide to hit the return key. It will create a new paragraph only when I begin the tag with another one. <P>Here's the next paragraph. | | 显示结果 | Here is the text for my paragraph. It does't matter how long it is, how many space are between the words or when I decide to hit the return key. It will create a new paragraph only when I begin the tag with another one. Here's the next paragraph. |
|
|
| 由于浏览器会自动忽略原始码中空白和换行的部分,这令到<BR>成为最常用的标记之 一。因为无论你在原始码中编好了多漂亮的文章,若不适当地加上换行标记或段落标记, 浏览器只会将它显示成一大段。 错误示范:(邮局可不会接受一行过的地址) | 原始码 | 566 E Boston Post RD Mamaroneck NY 10543-9982 United States of America | | 结果 | 566 E Boston Post RD Mamaroneck NY 10543-9982 United States of America |
正确例子: | 原始码 | 566 E Boston Post RD <BR>Mamaroneck NY 10543-9982 <BR>United States of America | | 结果 | 566 E Boston Post RD Mamaroneck NY 10543-9982 United States of America |
|
|
<HR> 之参数修改: 以: <HR align="LEFT" size="2" width="70%" color="#0000FF" noshade> 为例。 - align="LEFT"
设定线条置放位置,可选择:left;right;center 三种设定值。 - size="2"
设定线条厚度,以像素作单位,内定为 2。 - width="70%"
设定线条长度,可以是绝对值(以像素作单位)或相对值,内定为 100%。 - color="#0000FF" 『只适用于IE』
设定线条颜色,内定为黑色。 #0000FF 代表蓝色,亦可以采用颜色的名称,即 text="blue" 。 - noshade
设定线条为平面显示,若删去则具阴影或立体,这是内定值。
例子: | 原始码 | <HR> <HR align="LEFT" size="4"> <HR align="LEFT" size="2" width="70%" color="#0000FF" noshade> <HR align="LEFT" size="4" width="70" color="#008000"> | | 显示结果 |
|
|
|
| 这标记原先是 Netscape 所定义,后来其它浏览器都支持它,但你会发现很多标记已有 align="CENTER" 的参数,<CENTER>似乎多馀了,事实上它还是常用的标记之一,其简单 易用,常用于文字上,对于己加有 align="CENTER" 参数的 <TABLE> 标记亦要不厌其烦 地加上居中标记,因有狻多浏览器不支持<TABLE> 标记中的 align="CENTER" 参数。 例子: | 原始码 | <CENTER>Chris's First Homepage</CENTER> <CENTER>What's new</CENTER> <CENTER>My profile</CENTER> | | 结果 | Chris's First Homepage What's new My profile |
|
|
| 这标记允许保留你于原始码中输入的空白及 Return。细看以下例子你便可体会到此标记的 威力。除了运用一大堆表格标记之外你只有采用这标记才能有此效果。 能以<PRE>标记产生对 效果,或产生多于一行的空白才算上乘! 例子: | 原始码 | <pre> Creation of Webpage Log Analysis I Composer Learning 459 407 480 522 547 586 673 HTML Advanced 200 268 296 358 385 453 506</pre> | | 显示结果 | Creation of Webpage Log Analysis I Composer Learning 459 407 480 522 547 586 673 HTML Advanced 200 268 296 358 385 453 506 |
|
|
<DIV>应用于 Style Sheet(式样表)方面会更显威力,它最终目的是给设计者另一种组织 能力,有 Class ; Style ; title ; ID 等属性,将会于【Style Sheet】一节才作详述,这处只介绍 一个属性设定。 以 <DIV align="center"> 为例: - align="center"
可选值:center ; left ; right 。决定字、画、表格等居中、靠左或靠右。 <DIV align="center"> 的作用和居中标记 <CENTER>一样,前者是由 HTML3.0 开始 的标准,后者是通用己久的标示法。
例子: | 原始码 | <DIV align="center">Chris's First Homepage <br>What's new <br>My profile</DIV> | | 结果 | Chris's First Homepage What's new My profile |
|
|
例子:(其中 Chris's Creation of Webpage 将不被分开而显示于同一行。) | 码 | If you want to know how to create you own homepage quickly, don't miss <NOBR>Chris's Creation of Webpage</NOBR> which will help you a lot. | | 结果 | If you want to know how to create you own homepage quickly, don't miss Chris's Creation of Webpage which will help you a lot. |
|
|
| 它没有侵犯到 <BR> 的责任,只是作建议而已,若观者的系统解像度够高的话,那么它是 不会折行的。 例子:(若不加<WBR>标记,整个网址会显示于下一行。) | 原始码 | Please visit my other homepage which locate at http://www.geocities.com/SiliconValley/<WBR>Sector/8234/index.html There are many softwares for download. I think you will really love that place. | | 结果 | Please visit my other homepage which locate at http://www.geocities.com/SiliconValley/Sector/8234/index.html There are many softwares for download. I think you will really love that place. |
|