Html 5 学习笔记
声明 HTML 的文档类型
<!DOCTYPE html>
<html>
<h1>cai</h1>
</html>
定义 HTML 文档的 head 和 body
<!DOCTYPE html>
<html>
<head>
<meta />
</head>
<body>
<div>
</div>
</body>
</html>
input
<input type="text" placeholder="cat photo URL">
<form action="https://www.freecatphotoapp.com/submit-cat-photo">
<input type="text" required placeholder="cat photo URL">
<button type="submit">Submit</button>
</form>
单选框
<label for="indoor">
<input id="indoor" type="radio" name="indoor-outdoor">indoor
</label>
<label for="outdoor">
<input id="outdoor" type="radio" name="indoor-outdoor">outdoor
</label>
复选框
<label for="loving"><input id="loving" type="checkbox" name="personality"> Loving</label>
<label for="lazy"><input id="lazy" type="checkbox" name="personality"> Lazy</label>
<label for="energetic"><input id="energetic" type="checkbox" name="personality"> Energetic</label><br>
选中单选框和复选框
<label for="indoor"><input id="indoor" type="radio" name="indoor-outdoor" value="indoor" checked> Indoor</label>
<label for="loving"><input id="loving" type="checkbox" name="personality" value="loving" checked> Loving</label>