码迷,mamicode.com
首页 > Web开发 > 详细

html标签

时间:2015-11-19 01:48:38      阅读:150      评论:0      收藏:0      [点我收藏+]

标签:

html的一般格式

<html>

      <head> 

               <tittle>         </tittle>

     </head>

     <body>

     <!--内容-->

    </body>

</html>

 

常用标签

<!-- -->注释  里面是内容               例如<!--这是注释 -->

<br>换行  相当于C/JAVA里的\n

<hr>创建一条水平线,

<sub>下标    例如x<sub>n</sub>   等价于Xn(数学)

<sup>上标    例如 x<sub>n</sup>  等价于x^n(数学)

<p>段落                                     例如<p>This is some text in a very short paragraph</p>

<a>超链接   有href属性, 文字链接  例如<a href="http://www.baidu.com">hi</a> 

                                    图像链接        <a href="http://www.w3school.com.cn/index.html">
                                                       <img src="C:\Users\YEYU\Pictures\1.jpg" />
                                                       </a>

<font>规定文本字体、大小和颜色   例如  <font color="red" size=10>hi</font>        

<img> 图像标签             例如 <img src="C:\Users\YEYU\Pictures\1.jpg"/>

           属性width,height        <img src="C:\Users\YEYU\Pictures\1.jpg" width=800 height=600/>

<dir> 列表标签

                       例如<dir>
                                             <li>HTML</li>
                                             <li>XHTML</li>
                                             <li>CSS</li>
                         </dir>        

<table>表格标签   tr 元素定义表格行,th 元素定义表头,td 元素定义表格单元

                                   例如<table>
                                            <tr>
                                                 <th>Month</th>
                                                 <th>Savings</th>
                                            </tr>
                                             <tr>
                                                 <td>January</td>
                                                 <td>$100</td>
                                             </tr>
                        </table>                  

<frameset>定义一个框架集  有两个属性 cols  列的数目和尺寸

                                                      rows 行的数目和尺寸

                                                                                    例子

                                                     <frameset cols="25%,50%,25%">
                                                        <frame src="frame_a.htm" />
                                                        <frame src="frame_b.htm" />
                                                        <frame src="frame_c.htm" />
                                                     </frameset>

<input>

             <input type="file">输入字段和 "浏览"按钮,供文件上传

             <input type="button">可点击按钮(多数情况下,用于通过 JavaScript 启动脚本)

             <input type="hidden">客户端收不到,服务端能收到

             <input type="image">图像形式的提交按钮

             <input type="submit">提交按钮

             <input type="reset">重置按钮。重置按钮会清除表单中的所有数据

             <input type="text">单行的输入字段,用户可在其中输入文本。默认宽度为 20 个字符

             <input type="checkbox">复选框

             <input type="radio">单选框

             <input type="password">输入密码

             <input type="textarea">

<select>下拉菜单

 <select>

            <option> </option>   (value=none)

             <option> </option>

             <option> </option>

             <option> </option>

</select>

                                                  例如<select>

                                                                     <option>A</option>

                                                                     <option>B</option>

                                                                     <option>C</option>

                                                                     <option>D</option>

                                                        </select>

 

 

   

 

html标签

标签:

原文地址:http://www.cnblogs.com/JLUyeyu/p/4976358.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!