<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="author" content="名字" />
<!--author 是作者 content 里面写作者名字-->
<title>input标签</title>
</head>
<body>
账号:<input type="text" placeholder="请输入账号" />
<!--text文本输入框-->
<!--placeholder温馨提示文字-->
<br />
密码:<input type="password" placeholder="请输入密码" />
<!--password密码-->
<br />
<input type="button" value="登录" />
<button>打开文件</button>
<!--button 按钮-->
<label><input type="checkbox" />苹果</label>
<label><input type="checkbox" />西瓜</label>
<label><input type="checkbox" />梨</label>
<label><input type="checkbox" />香蕉</label>
<!--checkbox多选框-->
<br />
<label>
<input type="radio" name="sex" />男
</label>
<label>
<input type="radio" name="sex" />女
</label>
<!--radio单选框,需要匹配相同的name值-->
<!--label是为了让男、女与选框关联-->
<input type="file" />
<!--file文件-->
<input type="number" />
<!--number数字选框-->
<input type="date" />
<!--date日期-->
<input type="submit" />
<!--submit提交按钮-->
<input type="reset" />
<!--reset重置按钮-->
<input type="color" />
<!--color颜色选框-->
地址:<select>
<option value="">北京</option>
<option value="">上海</option>
<option value="">广州</option>
<option value="">深圳</option>
<option value="" selected="selected">郑州</option>
</select>
<!--select下拉选框-->
<!--selected更改默认选项-->
<!--多行文本输入框-->
<textarea name="" id="" cols="30" rows="10"></textarea>
<!--textarea区域输入框(可输入多行)-->
<!--cols 列 ,rows ,行-->
</select>
</body>
</html>
表单 输入框
最新推荐文章于 2024-09-23 23:04:16 发布