• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • YouClaw
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
翠绿之风
博客园    首页    新随笔    联系   管理    订阅  订阅

html标签

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>

 

 

   

 

posted @ 2015-11-19 00:14  翠绿之风  阅读(303)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3