Blogger Information
Blog 11
fans 2
comment 0
visits 8236
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
html文档结构与常用标签--2019-07-02 22:00
烦帅不防晒
Original
662 people have browsed it

html文件中的所有元素,都需要标签来修饰,标签是必不可少的。

一、文档结构

    <!doctype html>  声明

<head>...</head>  头部部分,浏览器查看

<body>...</body>身体部分,用户查看

二、无序列表的基本使用

实例

    <ul>回收
        <li>冰箱</li>
        <li>彩电</li>
        <li>空调</li>
    </ul>
运行实例 »

点击 "运行实例" 按钮查看在线实例

三、表格的用法以及行列合并的应用

实例

   <table border="1" cellspacing="0" width="300px" align="letf">
        <caption>回收价格</caption>
        <thead>
          <tr bgcolor="silver">
              <td>序号</td>
              <td>产品</td>
              <td>单价</td>
              <td>数量</td>
              <td>总价</td>
          </tr>
        </thead>
        <tbody align="center">
          <tr>
              <td>1</td>
              <td>冰箱</td>
              <td>100</td>
              <td>1</td>
              <td>100</td>
          </tr>
          <tr>
              <td>2</td>
              <td>彩电</td>
              <td>50</td>
              <td>3</td>
              <td>150</td>
          </tr>
          <tr>
              <td>3</td>
              <td>空调</td>
              <td>200</td>
              <td>2</td>
              <td>400</td>
          </tr>
          <tr>
              <td colspan="3">总计</td>
              <td>6</td>
              <td>650</td>
          </tr>
        </tbody>
    </table>

运行实例 »

点击 "运行实例" 按钮查看在线实例

四、表单以及常用控件元素的使用

实例

<h3>报名信息填写</h3>
<form action="" method="get" name="register">
    <p>
        <label for="usename">账号:</label>
        <input type="text" name="usename" id="usename" placeholder="不超过8字符" maxlength="8">
    </p>
    <p>
        <label for="password">密码:</label>
        <input type="password" id="password" name="password" >
    </p>
    <p>
        <label for="age"> 年龄:  </label>
        <input type="number" id="age" name="age" min="20" max="80">
    </p>
    <p>
        <label for="birthplace">出生地</label>
        <select name="birthplace" id="birthplace" >
            <option value="0">请选择</option>
            <option value="1">京津翼</option>
            <option value="2">黔东南</option>
            <option value="3">其他</option>
        </select>
    </p>
    <p>
        <label for="game">爱好:</label>
        <input type="checkbox" id="game" name="hobby" value="game" checked>
        <label for="game">游戏</label>
        <input type="checkbox" id="book" name="hobby" value="book" >
        <label for="book">看书</label>
    </p>
    <p>
        <label for="male">性别:</label>
        <input type="radio" name="gender" id="man">
        <label for="man"> 男</label>
        <input type="radio" name="gender" id="male">
        <label for="male">女</label>
    </p>
    <p>
        <label for="comment">简介:</label><br>
        <textarea name="comment" id="comment" maxlength="80" rows="10" cols="30" placeholder="不超过80字符"></textarea>
    </p>
    <p>
        <input type="submit"name="submit"value="提交">
        <input type="reset" name="reset" value="重置">
    </p>
</form>

运行实例 »

点击 "运行实例" 按钮查看在线实例




Correction status:qualified

Teacher's comments:完成的很好
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments