1.标签
1.img
<img src="" alt="" title="" width="" height=""/>
alt是图像加载失败,显示默认文字
title是鼠标悬停在图片显示的文字
2.a
<a href="" target="_blank"> </a>新页面打开
<a href="img.zip" target="_self"> </a> 默认,当前页面打开
这个就是下载,超链接
锚点链接
<a href="#live">个人生活</a> 点击上面的跳转到下面
<h1 id="live">个人生活</h1>
3.表格
1.基本语法
<table align="center" border="1" cellpadding="20" cellspacing="0"> 表格居中
<tr> 行
<th></th> 列,加粗
<th></th>
<tr>
<tr>
<td></td>
<td></td>
<tr>
<table>
cellpadding: 表格数据到左边竖线的距离
cellspacing: 表格分割线之间的距离
2.表格结构
<table>
<thead>
</thead>
<tbody>
</tbody>
</table>
3.合并单元格
跨行(上下合并)<td rowspan="2" ></td>
跨列(左右合并)<td colspan="2" ></td>
4.表单
1.input的type属性
- file
- hidden
- image 图像形式提交按钮
- radio 单选框(必须有同一个name)
- reset 重置
- submit
- checkbox 复选框
2.label
2.特殊字符
3.H5新特性
1.新标签
-
<header>
头部标签 -
<nav>
导航标签 -
<article>
内容标签 -
<section>
定义文档某个区域 -
<aside>
侧边栏标签 -
<footer>
尾部标签
2.form表单
<!-- 我们验证的时候必须添加form表单域 -->
<form action="">
<ul>
<li>邮箱: <input type="email" /></li>
<li>网址: <input type="url" /></li>
<li>日期: <input type="date" /></li>
<li>时间: <input type="time" /></li>
<li>数量: <input type="number" /></li>
<li>手机号码: <input type="tel" /></li>
<li>搜索: <input type="search" /></li>
<li>颜色: <input type="color" /></li>
<!-- 当我们点击提交按钮就可以验证表单了 -->
<li> <input type="submit" value="提交"></li>
</ul>
</form>
3.表单新属性(自动聚焦,历史记录)
required="required"
multiple="multiple"