HTML学习笔记
1 基本结构
<html>
<head>
//不显示在浏览器中
</head>
<body>
//显示在浏览器中
</body>
</html>
1.1 标签
<h1>一级标题</h1>
<h2>二级标题</h2>
<h3>三级标题</h3>
<h4>四级标题</h4>
<h5>五级标题</h5>
<h6>六级标题</h6>
<br>//表示换行
<ul>
<li>无序列表</li>
</ul>
<ol>
<li>有序列表</li>
</ol>
//图片标签的使用
<img wigth="100"
height="130"
src="......."
alt="san logo"//当src中的地址找不到时,显示alt中的内容
/>
//超链接属性
<a href="...">W3School</a>
//着重阅读,斜体
<em>斜体</em>
//着重阅读,加粗
<strong>加粗</strong>
//输入框
<input type="text"/>
<input type="text" placeholder="请输入文本"/>
//复选框
<input type="checkbox"/>第一个选项
<input type="checkbox"/>第二个选项
//优化写法
<lable>
<input type="checkbox"
id="cbox1-pro"
value="first_checkbox"/>第一个选项
</lable>
<lable>
<input type="checkbox"
id="cbox2-pro"
value="second_checkbox"/>第二个选项
</lable>
//选择文件
<input type="file"/>
//单选框
<lable>
<input type="radio"
id="radio1"/>first radio
</lable>
<lable>
<input type="radio"
name="radio"
id="radio2"/>second radio
</lable>
//控制范围,进度条
<input type="range"/>
//提交按钮
<input type="submit"/>
//多行纯文本编辑控件
//cols表示文本域的可视宽度,rows表示元素的输入文本的行数(显示的高度)
<testarea name="story" rows="S" cols="20">
this is a textarea
</testarea>