<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<form action="">
用户:<input type="text" name="userName"><br>
密码:<input type="password" name="userPwd"><br>
邮箱:<input type="email" name="userEmail"><br>
<!--/*type="email"验证了邮箱完整验证*/-->
电话:<input type="tel" name="userTel"><br>
<!--/*tel类型显示弹出数字键盘*/-->
网址:<input type="url" name="url"><br>
<!--number只能输入数字,购物时限制-->
数量:<input type="number" value="40" max="100" min="0"><br>
<!--serach-->
输入商品名称:<input type="search"> <br>
<!--range:范围-->
范围: <input type="range" max="100" min="0"><br>
color: <input type="color" value="myColor"><br>
时间:<input type="time"> <br>
日期:<input type="datetime-local"><br>
月份:<input type="month"><br>
星期:<input type="week"><br>s
<!--list与datalist建立关联,通过datalist的id不同浏览器支持,不用-->
专业:<input type="text" list="subjects">
<datalist id="subjects">
<option value="前端开发" label="前景一片钱途"></option>
<option value="java开发" label="茫茫人海"></option>
<option value="C++开发" label="不了解"></option>
</datalist>
<input type="submit">
</form>
</body>
</html>
H5标签使用:解决ie8无法兼容性问题
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
*{
padding: 0;
margin: 0;
}
header{
display: block;
width: 100%;
height: 80px;
background-color: red;
}
nav{
display: block;
width: 100%;
height: 36px;
background-color: green;
}
/*ie8中无法识别H5:*/
main{
/*将行级元素转化为块级元素*/
display: block;
width: 100%;
height: 400px;
background-color: #ccc;
}
main > article{
width: 80%;
height: 100%;
background-color:aqua ;
float: left;
}
main > aside{
width: 20%;
height: 100%;
background-color: pink;
float:right;
}
footer{
width: 100%;
height: 100px;
background-color: #fff;
}
</style>
</head>
<body>
<script src="../js/html5shiv.min.js">
// /*手动添加标签,满足ie8*/
// document.createElement("header")
//引入插件解决ie8无法兼容H5
</script>
<header>头部</header>
<nav>导航</nav>
<main>
<article>左边</article>
<aside>右边</aside>
</main>
<footer>底部</footer>
</body>
</html>