表格标签
html 代码
- <table border="1" width="800" height="800">
- <caption > 表格外的标题 </caption>
- <thead>
- <tr>
- <th bgcolor="#999999">h1</th>
- <th>h2</th>
- <th>h3</th>
- <th>h4</th>
- </tr>
- </thead><!-- 表格头部 -->
- <tbody>
- <tr>
- <th > 内容 1</th>
- <td > 内容 2</td>
- <td > 内容 3</td>
- <td > 内容 4</td>
- </tr>
- </tbody><!-- 表格内容 -->
- <tfoot>
- <tr>
- <td colspan="4"> 尾部 </td>
- </tr>
- </tfoot>
- </table>
*tr: 表示表格的每一行
th: 表头单元格
td: 普通单元格
表单标签
form: 有两个属性
(1)action: 提交表单的后台地址
(2)method: 表单提交的方式
fieldset: 分区
legend: 分区里的标题
html 代码
- <form action="/login" method="post">
- <fieldset>
- <legend > 分区标题 </legend>
- <input type="file" name="file"/>
- <label for=""> 文件 </label>
- <input type="checkbox" name=""id="" checked/>
- <label for=""> 多选框 </label>
- <input type="radio" name=""id="" />
- <label for=""> 单选 </label>
- <input type="text" name=""id="" />
- <label for=""> 描述 </label>
- </fieldset>
- </form>
按钮:
input 或者 button
html 代码
- <form action="/login" method="post">
- <div>
- <input type="submit">
- <input type="reset">
- </div>
- <div>
- <button type="submit"> 提交 </button>
- <button type="reset"> 重置 </button>
- </div>
- </form>
下拉菜单:
html 代码
- <form action="/login" method="post" accept-charset="utf-8">
- <div>
- <label for="delivery"> 下拉菜单 </label>
- <select id="delivery">
- <option value="0">item1</option>
- <option value="1">item2</option>
- <option value="2">item3</option>
- <option value="3" selected>item4</option>
- <option value="4">item5</option>
- </select>
- </div>
- <div>
- <label for="feedback"> 意见反馈 </label>
- <textarea name="feedback" rows="4" id="feedback" readonly></textarea>
- </div>
- </form>
- input type:
- url
- number
- tel
- search
- range
- color
- date picker
语义化
用正确的标签来描述页面
作用:
1. 有利于 SEO(Search Engine Optimization)
搜索引擎的爬虫会根据语义化的标签来确定关键字的权重
2. 提高可访问性
3. 可以提高可读性
实体字符
html 代码
<div>
这是 < span>
</div>
表示方式:
- &entity_name;
- &#entity_number;
常用实体:
空格 ( )
html 代码
- <button>l o g i n</button>
- "(")
- >(>)
- <(<)
©(©)
&(&)
来源: http://www.qdfuns.com/article/40336/af0b7f945c98538e2ac79e8e7c14c4bf.html