本来<P>是一围堵标记,标于一段落的头尾,但从 HTML 2.0 开始己不需要</P>作结尾。
<P> 的常用参数: 如:<p align="center">
例子: 原始码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> :▲Top<BR>称为换行标记。作用:令字、画、表格等显示于下一行。由于浏览器会自动忽略原始码中空白和换行的部分,这令到<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> 为例。
例子: 原始码<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> 结果
这标记允许保留你于原始码中输入的空白及 Return。细看以下例子你便可体会到此标记的 威力。除了运用一大堆表格标记之外你只有采用这标记才能有此效果。
能以<PRE>标记产生对 效果,或产生多于一行的空白才算上乘!
例子: 原始码
<pre>Creation of Webpage Log Analysis IComposer Learning 459 407 480 522 547 586 673HTML Advanced 200 268 296 358 385 453 506</pre>显示结果
Creation of Webpage Log Analysis IComposer Learning 459 407 480 522 547 586 673HTML Advanced 200 268 296 358 385 453 506■ <DIV> :▲Top<DIV>称为区隔标记。作用:设定字、画、表格等的摆放位置。
<DIV>应用于 Style Sheet(式样表)方面会更显威力,它最终目的是给设计者另一种组织 能力,有 Class ; Style ; title ; ID 等属性,将会于【Style Sheet】一节才作详述,这处只介绍 一个属性设定。
以 <DIV align="center"> 为例:
例子: 原始码<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
例子:(若不加<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/
上一篇:HTML语言剖析(五)字体标记
下一篇:HTML语言剖析(三)文件标记
共有 0 位网友发表了评论,平均得分: 0 查看完整内容