<h1>标题</h1> :可以是h1到h7 <p>一段话</p> <br>强制换行 <b>粗体</b>,<i>斜体</i>,<u>下划线</u>,<s>删除线</s>,<sup>上标</sup>,<sub>下标<sub>,<strike>删除线</strike>,<tt>设置成打印机字体</tt> 逻辑字体:<em>强调文字</em> <strong>字体加重</strong> <code>显示编程代码</code> <samp>显示示例文字</samp> <kbd>显示键盘按键文字</kbd> <var>斜体字渲染</var> <small>缩小字体</small> <big>放大字体</big> <p>可单独使用,表示换行。但记住标准的强制换行符是<br> <nobr>永不换行</nobr> 文字及其它对象对齐方式:align="left/center/right" <center>居中</center> 在网站的新闻列表中,新闻标题前会出现一个小圆点,而有的是有序号的数字,前者表示无序列表,后者表示有序列表。 无序列表:<ul> <li>表项一</li> <li>表项二</li> <li>表项三</li> </ul> 有序列表: <ol type="A/a/I/1等"> <li>表项一</li> <li>表项二</li> <li>表项三</li> </ol> <pre>预格式化文字(空格等都原样输出)</pre> <xmp>文本(与pre标签相似,但xmp连文本中的HTML标签都输出)</xmp> <img src="图像地址"> 注:img标签只能放在body标签中 <a href="http://www.baidu.com"><img src="cn.jpg" alt="风景"></a> 注:alt表示图像没有下载完时显示的文字 图像与文字这两者之间的对齐方式: <img src="#" align="#">文本 注:align的值可以是top(顸),right(右),bottom(底),left(左),middle(中间)默认方式是底部对齐。 图像大小: <img src="图像地址" alt="图像示显示完时显示的文字" width="400px" height="300px"> 图像边框: <img src="图像地址" border="0px"> 设置图像映射图: <img src="图像地址" usemap="#face"> <map name="face"> <area shape="rect" href="page.html" coords="140,20,280,60"> </map> 注:coords中的坐标范围表示区域,热点区域在dreamweaver软件中很好做,这个标签不常用,可以不看。 超级链接: <a href="http://www.baidu.com" target="#" title="鼠标指向时显示的文字">百度一下</a> 注:target="_blank(新窗口中打开),_parent(你窗口中打开),_self(同一窗口中打开),top(在当前的整个浏览器中打开)" 锚点链接: <body> <a href="#html">单击到锚点链接</a> <br> <a name="html">锚点链接</a> </body> 邮箱链接: <a href="mailto:bigbao@yahoo.cn">作者的邮箱</a> 相对路径: ../表示源泉文件所在目录的上一级目录 ../../表示上上级目录,依此类推 表单: <form> <input type="#"> </form> 注:#可以是"ext,password,checkbox,radio,hidden,submit,reset,button“。radio表示单选框,checkbox表示复选框。 <textarea>文本域</textarea> <textarea name="" rows=6 cols=60>文本域</textarea> 注:rows表示行数,cols表示列数。 表单中的下拉表: <form> <select name="" size=""> <option value="">选项一</option> <option value="">选项二</option> <option value="" selected>选项三</option> </select> 注:<select>里的属性可以由name代表这个下拉表的名称,size表示下拉表可视选项数目,multiple表示可以多选,没有则表示不可以多选,<option>中的selected表示默认选项。 表单中的复选框: <form> <input type="checkbox" name=book value="">姓名 <input type="checkbox" name=book value="" checked>性别 </form> 注:<input>中的checked表示为默认选中状态。 表单中的单选框: <form> <input type="radio" name=reg>姓名 <input type="radio" name=reg checked>性别 </form> 表格: <table border="1" width="300" height="200" align="right/center/left"> <tr><td align="left/right/center">单元格一</td><td>单元格二<td></tr> <tr><td>单元格三</td><td>单元格四</td></tr> </table> 跨多行:<td rowspan=3></td> 跨多列:<td colspan=3></td> 框架: <html> <head><title>标题</title></head> <frameset cols="25%,50%,25%"> <frame src="*.htm" noresize="noresize"> <frame src="*.htm"> <frame src="*.htm"> </frameset> </html> 注:frameset不能与body并列,所以应去掉body标签,noresize用于设置框架大小是否可调。 隐藏框架边框:<frameset frameborder="no"> </frameset> 滚动条:<frameset cols="40%,60%"> <frame src="#" scrolling="auto/yes/no"> <frame src="#"> </frameset> 导航框架:(例) <a href="http://www.baidu.com " target="myForm1">在另一个文件中设置如下 <frameset> <frame name="myForm1"> </frameset> 注:scrolling只能在frame标签中用,frameborder在frameset和frame中均可使用。 内联框架: <iframe></iframe>或<iframe/>表示,放在<body>和</body>之间。 移动的文字和图像: <marquee>将要移动的文字或图片对象</marquee> 例: <marquee direction="right/up/down">向哪个方向移动</marquee> <marquee behavior="scroll/slide/alternate">怎么动</marquee> <marquee scrollamount=25>运动速度</marquee> <marquee scrolldelay=1000>走一走,停一停</marquee> <marquee width=200 height=200 bgcolor=green direction=down>限定移动的面积</marquee> 注:scroll:循环移动。slide:只移动一个回合。alternate:来回移动。scrollamount的值越大,速度越快。scrolldelay的值1000代表1000毫秒,等于一秒。 多媒体标记: <embed src="*.mp3" autostart="true/false" loop="true/false/次数"> loop:循环。autostart:自动播放。 隐藏面板:<embed src="url" hiden="true/false"> 面板大小:<embed src="url" height="200" width="200">默认单位是像素px,也可以写成height="200px",width="200px"。 对齐方式align:<embed src="url" align="top/bottom/center......."> (HTML其它标签属性都不需要记住,因为现在都用CSS代替) |
|