版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、.1. 表单(FORM)标记(TAGS)1. 基本语法1.1表单的基本语法<form action="url" method=*>. . <input type=submit> <input type=reset></form>*=GET, POST1.2表单中提供给用户的输入形式<input type=* name=*>*=text, password, checkbox, radio, image, hidden, submit, reset*=Symbolic Name for CGI script2. 文字
2、输入和密码输入 *=text, password<input type=*><input type=* value=*><form action=/cgi-bin/post-query method=POST>您的姓名: <input type=text name=姓名><br>您的主页的网址: <input type=text name=网址 value=http:/><br>密码: <input type=password name=密码><br><input type=sub
3、mit value="发送"><input type=reset value="重设"></form>窗体顶端您的姓名: 您的主页的网址: 密码: 窗体底端<input type=* size=*><input type=* maxlength=*><form action=/cgi-bin/post-query method=POST><input type=text name=a01 size=40><br><input type=text name=a0
4、2 maxlength=5><br><input type=submit><input type=reset></form>3. 复选框(Checkbox) 和 单选框(RadioButton)3.1 Checkbox<input type=checkbox><input type=checkbox checked><input type=checkbox value=*><form action=/cgi-bin/post-query method=POST><input type=c
5、heckbox name=水果1> Banana<p><input type=checkbox name=水果2 checked> Apple<p><input type=checkbox name=水果3 value=橘子> Orange<p><input type=submit><input type=reset></form>变量的名字是不同的3.2 RadioButton窗体底端<input type=radio value=*><input type=radio v
6、alue=* checked><form action=/cgi-bin/post-query method=POST><input type=radio name=水果> Banana<p><input type=radio name=水果 checked> Apple<p><input type=radio name=水果 value=橘子> Orange<p><input type=submit><input type=reset></form>变量的名字是相同的
7、才能单选4. 图象坐标在下面选则一个系数后,在图象上点一下,就知道什么是图象坐标了!<input type=image src=url><form action=/cgi-bin/post-query method=POST><input type=image name=face src=f.gif><p><input type=radio name=zoom value=2 checked>x2<input type=radio name=zoom value=4>x4<input type=radio name=
8、zoom value=6>x6<p><input type=reset></form>窗体顶端x2 x4 x6窗体底端5. 隐藏表单的元素<input type=hidden value=*><form action=/cgi-bin/post-query method=POST><input type=hidden name=add value=hogehoge.jp>Here is a hidden element. <p><input type=submit><input type
9、=reset></form>窗体顶端Here is a hidden element.窗体底端6. 列表框(Selectable Menu)6.1基本语法<select name=*><option> .</select><option selected><option value=*><form action=/cgi-bin/post-query method=POST><select name=fruits> <option>Banana <option selecte
10、d>Apple <option value=My_Favorite>Orange</select><p><input type=submit><input type=reset></form>窗体顶端6.2 大小设置<select size=*><form action=/cgi-bin/post-query method=POST><select name=fruits size=3> <option>Banana <option selected>App
11、le <option value=My_Favorite>Orange <option>Peach</select><p><input type=submit><input type=reset></form>窗体顶端6.3 设置多选窗体底端<select size=* multiple>注意,是用 Ctrl 键配合鼠标实现多选。(和 MS-WINDOWS 的 File Manager 一样)<form action=/cgi-bin/post-query method=POST><
12、;select name=fruits size=3 multiple> <option selected>Banana <option selected>Apple <option value=My_Favorite>Orange <option selected>Peach</select><p><input type=submit><input type=reset></form>窗体顶端窗体底端7 .文本区域7.1建一个文本域<textarea name=* rows
13、=* cols=*> . <textarea><form action=/cgi-bin/post-query method=POST><textarea name=comment rows=5 cols=60></textarea><P><input type=submit><input type=reset></form>窗体顶端窗体底端7.2 对于很长的行是否进行换行的设置(Word Wrapping) ·<textarea wrap=off> . </tex
14、tarea>不换行,是缺省设置。·<textarea wrap=soft> . </textarea>“软换行”,好象 MSWORD 里的“软回车”。<form action=/cgi-bin/post-query method=POST><textarea wrap=soft name=comment rows=5 cols=25> </textarea><P><input type=submit><input type=reset></form>窗体顶端窗体底端
15、83;<textarea wrap=hard> . </textarea>“硬换行”,好象 MSWORD 里的“硬回车”。<form action=/cgi-bin/post-query method=POST><textarea wrap=hard name=comment rows=5 cols=25> </textarea><P><input type=submit><input type=reset></form>2. 文字布局2.1行的控制2.1.1段(Paragraph) (
16、可以看作是空行) <p>你好吗?<p>很好。你好吗?很好。2.1.2换行 <br>你好吗?<br>很好。你好吗?很好。2.1.3不换行<nobr><nobr> 请改变您浏览器窗口的宽度, 使之小于这一行的宽度, 看看这个标记的作用!</nobr>请改变您浏览器窗口的宽度,使之小于这一行的宽度,看看这个标记的作用!2.2文字的对齐(Alignment)<hn align=#>.</hn> <p align=#>.</p> #=left, center, right&
17、lt;h3 align=center>Hello<h3><h3 align=right>Hello<h3>HelloHello<center>.</center><center>Hello</center>Hello2.3文字的分区(Division)显示<div align=left> . </div><div align=left>Can you feel happiness without unpleasant? <br>Please show me
18、your smile.</div>Can you feel happiness without unpleasant?Please show me your smile.<div align=center> . </div>Can you feel happiness without unpleasant?Please show me your smile.<div align=right> . </div>Can you feel happiness without unpleasant?Please show me your sm
19、ile.2.4 列表2.4.1无序列表 <ul><li>.</ul><ul><li>Today<li>Tommorow</ul>· Today· Tommorow2.4.2有序列表 <ol><li>.</ol><ol><li>Today<li>Tommorow</ol>1 Today2 Tommorow2.4.3 定义列表(Definition lists) <dl><dt>.<
20、dd>.</dl><dl><dt>Today<dd>Today is yesterday.<dt>Tomorrow<dd>Tomorrow is today.</dl>TodayToday will be yesterday.TomorrowTomorrow will be today.Definition lists Compact <dl compact><dt>.<dd>.</dl>TodayToday will be yesterday.NextTo
21、morrow will be today.<dl compact><dt>Today<dd>Today is yesterday.<dt>Tomorrow<dd>Tomorrow is today.</dl>2.5定制列表元素2.5.1 定制表中的标记 <li type=#> #=disk, circle, square<ul><li type=disc>ONE<li type=circle>TWO<li type=square>THREE</ul>&
22、#183; ONEo TWO§ THREE2.5.2 定制有序列表表中的序号 <li type=#> #=A, a, I, i, 1<ol><li type=A>ONE-ONE<li>ONE-TWO</ol>1 ONE-ONE1 ONE-TWO<ol><li type=a>ONE-ONE<li>ONE-TWO</ol>1 ONE-ONE1 ONE-TWO<ol><li type=I>ONE-ONE<li>ONE-TWO</ol>1
23、 ONE-ONE1 ONE-TWO<ol><li type=i>ONE-ONE<li>ONE-TWO</ol>1 ONE-ONE1 ONE-TWO<ol><li type=1>ONE-ONE<li>ONE-TWO</ol>1 ONE-ONE1 ONE-TWO2.5.3 定制有序列表表中的序号的起始值 <ol start=#> #=number<ol start=5><li type=A>ONE-ONE<li>ONE-TWO <ol start=1
24、0> <li>TWO-ONE <li type=i>TWO-TWO</ol></ol>2 ONE-ONE3 ONE-TWO3 TWO-ONE1 TWO-TWO2.6 预格式化文本(Preformatted Text)2.6.1 <pre>.</pre><pre>Please use your card.VISA Master<b>Here is an order form.</b><ul><li>Fax<li>Air Mail</ul>
25、;</pre>Please use your cardVISA MasterHere is an order form.· Fax· Air Mail2.6.2 <listing>.</listing><listing>Please use your card.VISA Master<b>Here is an order form.</b><ul><li>Fax<li>Air Mail</ul></listing>Please use your
26、 card.VISA MasterHere is order form.· Fax· Air Mail2.6.3 <xmp>.</xmp><xmp>Please use your card.VISA Master<b>Here is an order form.</b><ul><li>Fax<li>Air Mail</ul></xmp>Please use your card.VISA Master<b>Here is order form.&
27、lt;/b><ul><li>Fax<li>Air Mail</ul><pre><.pre>和<listing></listing>的效果基本上是差不多的<xmp></xmp>会按代码的编写的格式输出里面的所有的内容2.7空白(Spacer) <spacer type="horizontal" size=#> #=水平空白宽度<spacer type="vertical" size=#> #=竖直空白高度YE
28、STERDAY <spacer type="horizontal" size=50> TODAY<spacer type="vertical" size=50> TOMORROWYESTERDAY TODAY TOMORROW<spacer type="block" width=# height=# align=#>#=空白的尺寸#=top, middle, bottom, left, right<spacer type="block" width=150 height=5
29、0 align=left>YESTERDAY<br> TODAY<br> TOMORROWYESTERDAYTODAYTOMORROW2.8多列文本 <multicol cols=#> . </multicol> #=列的数目<multicol cols=2> text text text. </multicol> 例子<multicol gutter=#> . </multicol> #=列间的空白<multicol cols=2 gutter=100> text text te
30、xt. </multicol> 例子<multicol width=#> . </multicol> #=列的宽度<multicol cols=2 width=400> text text text. </multicol> 例子2.9其它块引用(Blockquote) <blockquote>.</blockquote>Her Song:<blockquote>When I was young, I listened to the radio waiting for my favorite son
31、gs.</blockquote>Her Song:When I was young, I listened to the radio waiting for my favorite songs.闪烁 <blink>.</blink><BLINK> 闪烁!闪烁! </BLINK>闪烁!闪烁!3. 表格(TABLE)标记(TAGS)3.1 表格的基本语法<table>.</table> - 定义表格<tr> - 定义表行<th> - 定义表头<td> - 定义表元(表格的具体数据
32、)3.1.1带边框的表格:<table border><tr><th>Food</th><th>Drink</th><th>Sweet</th><tr><td>A</td><td>B</td><td>C</td> </table>FoodDrinkSweetABC3.1.2 不带边框的表格: <table><tr><th>Food</th><th>
33、;Drink</th><th>Sweet</th><tr><td>A</td><td>B</td><td>C</td> </table>FoodDrinkSweetABC3.1.3 跨多行、多列的表元(Table Span)·跨多列的表元 <th colspan=#><table border><tr><th colspan=3> Morning Menu</th><tr><t
34、h>Food</th> <th>Drink</th> <th>Sweet</th><tr><td>A</td><td>B</td><td>C</td></table>Morning MenuFoodDrinkSweetABC·跨多行的表元 <th rowspan=#><table border><tr><th rowspan=3> Morning Menu</th>
35、 <th>Food</th> <td>A</td></tr><tr><th>Drink</th> <td>B</td></tr><tr><th>Sweet</th> <td>C</td></tr></table>Morning MenuFoodADrinkBSweetC3.2 表格尺寸设置3.2.1<table border=#>边框尺寸设置:<table bor
36、der=10><tr><th>Food</th><th>Drink</th><th>Sweet</th><tr><td>A</td><td>B</td><td>C</td> </table>FoodDrinkSweetABC3.2.2 <table border width=# height=#>表格尺寸设置:<table border width=170 height=100><
37、tr><th>Food</th><th>Drink</th><th>Sweet</th><tr><td>A</td><td>B</td><td>C</td> </table>FoodDrinkSweetABC3.2.3 <table border cellspacing=#>表元间隙设置:<table border cellspacing=10><tr><th>Food<
38、;/th><th>Drink</th><th>Sweet</th><tr><td>A</td><td>B</td><td>C</td> </table>FoodDrinkSweetABC3.2.4 <table border cellpadding=#>表元内部空白设置:<table border cellpadding=10><tr><th>Food</th><th>Dri
39、nk</th><th>Sweet</th><tr><td>A</td><td>B</td><td>C</td> </table>FoodDrinkSweetABC3.3 表格内文字的对齐/布局3.3.1 水平对齐<tr align=#><th align=#> #=left, center, right<td align=#><table border width=160><tr> <th>F
40、ood</th><th>Drink</th><th>Sweet</th><tr> <td align=left>A</td> <td align=center>B</td> <td align=right>C</td> </table>FoodDrinkSweetABC3.3.2 竖直对齐<tr valign=#><th valign=#> #=top, middle, bottom, baseline<td
41、valign=#><table border height=100><tr> <th>Food</th><th>Drink</th> <th>Sweet</th><th>Other</th><tr> <td valign=top>A</td> <td valign=middle>B</td> <td valign=bottom>C</td> <td valign=baseline&
42、gt;D</td></table>FoodDrinkSweetOtherABCD3.4表格在页面中的对齐/布局(Floating Table)<table align=left><table align="left" border><tr><th>Food</th><th>Drink</th><th>Sweet</th><tr><td>A</td><td>B</td><td>
43、;C</td></table>My favorites.<br>cookies, chocolates, and more.FoodDrinkSweetABCMy favorites.cookies, chocolates, and more. <table align=right>FoodDrinkSweetABCMy favorites.cookies, chocolates, and more. <table vspace=# hspace=#> #=space value <table align="left&
44、quot; border vspace=20 hspace=30><tr><th>Food</th><th>Drink</th><th>Sweet</th><tr><td>A</td><td>B</td><td>C</td></table>My favorites.<br>cookies, chocolates, and more.FoodDrinkSweetABCMy favorites.cook
45、ies, chocolates, and more. 3.5表格的标题 <caption align=#> . </caption> #=left, center, right<table border><caption align=center>Lunch</caption><tr><th>Food</th><th>Drink</th><th>Sweet</th><tr><td>A</td><td>B&
46、lt;/td><td>C</td> </table>LunchFoodDrinkSweetABC<caption valign=#> . </caption> #=top, bottom· valign=top is default.<table border><caption valign=bottom>Lunch</caption><tr><th>Food</th><th>Drink</th><th>Swee
47、t</th><tr><td>A</td><td>B</td><td>C</td> </table>LunchFoodDrinkSweetABC窗体底端4. 页面(PAGE)标记(TAGS)4.1 HTML 文件结构(Document Structures)<html>.</html><head>.</head><body>.</body><HTML><HEAD> <title>,
48、<base>, <link>, <isindex>, <meta></HEAD><BODY> HTML 文件的正文写在这里. . </BODY></HTML>4.2 语言字符集(Charsets)的信息 <meta http-equiv="Content-Type" content="text/html;charset=#">#=us-ascii, iso-8859-1, x-mac-roman, iso-8859-2, x-mac-ce,iso-
49、2022-jp, x-sjis, x-euc-jp,euc-kr, iso-2022-kr,gb2312, gb_2312-80,x-euc-tw, x-cns11643-1, x-cns11643-2, big5可在 HTML 文件中设置 MIME 字符集信息。您在浏览主页时,最好自己在浏览器的选项菜单内选择相应的语言(language encoding)。但是如果 HTML 文件里写明了设置,浏览器就会自动设置语言选项。尤其是主页里用到了字符实体(entities),则该主页就应该写明字符集信息。否则,您在浏览该主页时,若未正确设置语言选项,显示将可能混乱。4.3 背景色彩和文字色彩<
50、;body bgcolor=# text=# link=# alink=# vlink=#>bgcolor - 背景色彩text - 非可链接文字的色彩link - 可链接文字的色彩alink - 正被点击的可链接文字的色彩vlink - 已经点击(访问)过的可链接文字的色彩#=rrggbb色彩是用 16 进制的 红绿蓝(red-green-blue, RGB) 值来表示。16 进制的数码有: 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f.4.4 背景图象 <body background="image-URL">Non Scrollin
51、g Background <body bgproperties=FIXED> 页面空白(Margin) 页面左边的空白 <body leftmargin=#>页面上方的空白(天头) <body topmargin=#> #=margin amount4.5 链接(Link)基本语法 <a href="URL"> . </a>这是一个<a href="samp/link.html">链接的例子</a>。 点一下带下划线的文字!这是一个链接的例子。 点一下带下划线的文字!跳转
52、到页面的另外一个地方<a href="#name"> . </a><a name="name"> . </a><a href="#jump-test">跳转到下一个"链接点"</a><P><a name="jump-test">下一个链接点</a>跳转到下一个"链接点"下一个链接点跳转到另一个页面的某个地方<a href="URL#name"&
53、gt; . </a><a name="name"> . </a>跳转到另一个页面的<a href="samp/link.html#jump-test">某个地方</a>。跳转到另一个页面的某个地方。4.6 开一个新的(浏览器)窗口 (Target Window)<a href="URL" target="Window_Name"> . </a><a href="samp/window.html" targe
54、t="window_name">开一个新窗口!</a>开一个新窗口!4.7 标尺线<hr><hr><hr size=#><hr size=10><hr width=#><hr width=50><hr width=50%><hr align=#> #=left, right<hr width=50% align=left><hr width=50% align=right><hr noshade><hr noshade&
55、gt;<hr color=#> #=rrggbb 16 进制 RGB 数码,或者是下列预定义色彩:Black, Olive, Teal, Red, Blue, Maroon, Navy, Gray, Lime, Fuchsia, White, Green, Purple, Silver, Yellow, Aqua<hr color="red">5. 图象(IMAGE)标记(TAGS)5.1 链入图象的基本语法<img src=#> #=图象的 URL<img alt=#> #=在浏览器尚未完全读入图象时,在图象位置显示的文字。
56、<img src="f.gif" alt="MY FACE :-)">5.2 图象和文字的对齐<img align=#> #=top, middle, bottom<img src=URL align=top> My face! My Face!<img src=URL align=middle> My face! My Face!<img src=URL align=bottom> My face! My Face!· 只有一行文字才可以放在图象的两边。(不知道翻译的对不对?)
57、83; Only one text line can be flown into the both side of Image.5.3 图象在页面中的对齐/布局(Floating Image)5.3.1 <img align=left><img src=URL align=left>My Face!<br>It is always<br>smiling.<br>Hahaha.<br>My Face!It is alwayssmiling.Hahaha.5.3.2 <img align=right>My Face
58、!It is alwayssmiling.Hahaha.<br clear=all><img src=URL align=left>My Face!<br>It is always<br clear=all>smiling.<br>Hahaha.<br>My Face!It is alwayssmiling.Hahaha.<img vspace=# hspace=#> #=value<img src=URL align=left vspace=10 hspace=20>My Face!<br&
59、gt;It is always<br>smiling.<br>Hahaha.<br>My Face!It is alwayssmiling.Hahaha.5.4 边框<img border=#> #=value<a href="URL"><img src=URL border=15></a>5.5 客户端图象映射图(Client Side Image Map)请在下图中用鼠标到处点一点,就会理解“客户端图象映射图”的意思了。<img src=img.gif usemap="M
60、AP-Name"><map name="MAP-Name"><area shape="#" coords="#" href="url"></map>#shape="rect" coords="A,A',B,B'"(A,A')=Upper Left, (B,B')=Lower Rightshape="circle" coords="A,A',R'&q
61、uot;(A,A')=Center, R=Radiusshape="poly" coords="A,A',B,B',C,C'."(A,A'>=First Corner, (B,B')=Second Corner, .<img src="mapimg.gif" usemap="#Face"><map name="Face"><!Text BOTTON> <area shape="rect&qu
62、ot; href="page.html" coords="140,20,280,60"><!Triangle BOTTON> <area shape="poly" href="image.html" coords="100,100,180,80,200,140"><!FACE> <area shape="circle" href="new.html" coords="80,100,60"&
63、gt;</map>6. 表格进阶(TABLE ADVANCED)6.1 表格的色彩6.1.1 表元的背景色彩和背景图象<th bgcolor=#> <th background="URL"> #=rrggbb 16 进制 RGB 数码, 或者是下列预定义色彩名称:Black, Olive, Teal, Red, Blue, Maroon, Navy, Gray, Lime, Fuchsia, White, Green, Purple, Silver, Yellow, Aqua<table border><tr>&l
64、t;th bgcolor=ffaa00>Food</th> <th bgcolor=Red>Drink</th> <th rowspan=2 background="image.gif">Sweet</th><tr bgcolor=white><td>A</td><td>B</td></table>FoodDrinkSweetAB6.1.2 表格边框的色彩 <table bordercolor=#><table cell
65、spacing=5 border=5 bodercolor=#ffaa00><tr><th>Food</th><th>Drink</th><th>Sweet</th><tr><td>A</td><td>B</td><td>C</td> </table>FoodDrinkSweetABC6.1.3 表格边框色彩的亮度控制 <table bordercolorlight=#><table bord
66、ercolordark=#><table cellspacing=5 border=5 bordercolorlight=White bordercolordark=Maroon><tr><th>Food</th><th>Drink</th><th>Sweet</th><tr><td>A</td><td>B</td><td>C</td> </table>FoodDrinkSweetABC6.2 表格
67、的分组显示(Structured Table) 6.2.1 按行分组 <thead> . </thead> - 表的题头(Header) <tbody> . </tbody> - 表的正文(Body) <tfoot> . </tfoot> - 表的脚注(Footer)<table border><thead> <tr><th>Food</th><th>Drink</th><th>Sweet</th></thea
68、d><tbody> <tr><td>A</td><td>B</td><td>C</td> <tr><td>D</td><td>E</td><td>F</td></tbody></table>FoodDrinkSweetABCDEF6.2.2 按列分组 <colgroup align=#> #=left, right, center<table border width=160><colgroup align=left><colgroup align=center><colgroup align=right> <thead> <tr><th>Food</th><th>Drink</th><th>Sweet</th> </thead> <tbody> <tr><td>A</td><td&
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025宁夏吴忠市红寺堡区属国有企业招聘(竞聘)管理人员情况及笔试历年常考点试题专练附带答案详解2卷
- 2025四川雅安市交通建设(集团)有限责任公司招聘所属子公司工作人员笔试笔试历年备考题库附带答案详解2卷
- 2025四川九洲线缆有限责任公司招聘副总工程师/工业装备事业部总经理1人笔试历年典型考点题库附带答案详解2卷
- 2025下半年四川内江市隆昌市兴晟产业投资集团有限公司招聘笔试及笔试历年典型考点题库附带答案详解2套试卷
- 中粮集团社会招聘4人笔试历年备考题库附带答案详解2套试卷
- 2025重庆天原化工有限公司招聘6人笔试历年典型考点题库附带答案详解2套试卷
- CAR-T细胞治疗与化疗联合应用的效果比较-洞察及研究
- 家电行业并购重组中的知识产权保护-洞察及研究
- 动态路由协议在多跳网络中的应用-洞察及研究
- 基于价值的医疗服务模式研究-洞察及研究
- 消费品行业投资咨询合同(2篇)
- 《检察院档案管理》课件
- 小学生冬季预防流感知识
- 临床试验质控
- 中小学报账员岗位职责
- 结核病科护理工作总结
- 克罗恩病的护理诊断和措施
- 广东省珠海市金砖四校2024-2025学年高一上学期11月期中考试 数学 含答案
- 校企合作意向书范本样式
- 项目6 配置与管理NFS服务器
- 2024年公务员遴选考试复习题库及答案
评论
0/150
提交评论