HTML中的列表示例

xiaoxiao2021-02-28  102

4.11下拉列表

使用下拉列表的好处:

方便,快捷

你想要购买汽车的品牌: <option value="honqi">红旗</option> <option value="byd">比亚迪</option> <option value="benz">奔驰</option> <option value="BMW">宝马</option> <option value="vw">大众</option>

  格式化的快捷键:ctrl+alt+L

<textarea> 标签定义多行的文本输入控件。

文本区中可容纳无限数量的文本,其中的文本的默认字体是等宽字体(通常是 Courier)。

可以通过 cols 和 rows 属性来规定 textarea 的尺寸,不过更好的办法是使用 CSS 的 height 和 width 属性。

fieldset 元素可将表单内的相关元素分组。

<fieldset> 标签将表单内容的一部分打包,生成一组相关表单的字段。

当一组表单元素放到 <fieldset> 标签内时,浏览器会以特殊方式来显示它们,它们可能有特殊的边界、3D 效果,或者甚至可创建一个子表单来处理这些元素。

<form>

  <fieldset>

   <legend>health information</legend>

    height:<input type="text" />

    weight:<input type="text" />

  </fieldset>

</form>

 

legend元素为 fieldset元素定义标题(caption)。

<form>

 <fieldset>

    <legend>healthinformation</legend>

    height:<input type="text" />

    weight:<input type="text" />

 </fieldset>

</form>

 

  4.12textarea

 Textarea标签为了方便用户输入,row属性指的是行数 ,cols指的是列数

学习经历: <textarea rows="3"cols="20"> </textarea>

 

4.13filedset

当信息较多时,可以按照信息的内容进行分组,达到表达清晰的目的。Filedset标签标示内容分框

<fieldset>     <legend>个人信息</legend>     姓名:      </fieldset>

  

    <caption>华鑫信息科技有限公司</caption>     <thead>     <tr>         <th>姓名</th>         <th>性别</th>         <th>生日</th>         <th>职位</th>         <th>电话</th>         <th>部门</th>     </tr> <tbody> <tr> <td>刘媛媛</td> <td></td> <td>1998-7-8</td> <td>秘书</td> <td>18839203520</td> <td>办公室</td> </tr> </tbody>     <td colspan="5">共计39</td>     </thead>

转载请注明原文地址: https://www.6miu.com/read-42776.html

最新回复(0)