1 头部
meta标签
// 为搜索引擎定义关键词
<meta name="keywords" content="HTML, CSS, XML, XHTML, JavaScript">
// 为网页定义描述内容
<meta name="description" content="免费 Web & 编程 教程">
// 定义网页作者
<meta name="author" content="Runoob">
// 每30秒刷新页面
<meta http-equiv="refresh" content="30">
2 文本格式化
<b>粗体文本
<em>着重文字
<i>斜体字
small 小号字
strong 加重语气
sub 下标
sup 上标
ins 插入字
del 删除字
3 链接
a
target属性:
_blank 新窗口打开
_parent 在父窗口中打开
_self 默认,当前页面跳转
_top 在当前窗体打开,并替换当前整个窗体
id属性:
可用于创建文档书签(在当前页面链接到指定位置(例如锚点导航))
<p>
<a href="#C4">看章节 4</a>
</p>
<h2>章节 1</h2>
<p>这边显示该章节的内容……</p>
<h2>章节 2</h2>
<p>这边显示该章节的内容……</p>
<h2>章节 3</h2>
<p>这边显示该章节的内容……</p>
<h2><a id="C4">章节 4</a></h2>
<p>这边显示该章节的内容……</p>
4 表格 table
colgroup和col 定义表格列的组和属性
<table border="1">
<colgroup>
<col span="2" style="background-color:red">
<col style="background-color:yellow">
</colgroup>
<tr>
<th>ISBN</th>
<th>Title</th>
<th>Price</th>
</tr>
</table>
col标签可以向整个列应用样式
span规定col元素横跨的列数
5 表单 form
form属性:
action:对接收到的用户输入数据进行处理
method:表单数据提交方式 post/get
输入标签input
类型type:text文本 password密码 radio单选按钮 checkbox复选框 submit提交按钮
6 html框架
iframe框架:在页面上嵌套一个目标链接页面
点击a标签的链接页面会显示在iframe框架中:
<iframe src="demo_iframe.htm" name="iframe_a"></iframe>
<p>
<a href="https://www.runoob.com"target="iframe_a">RUNOOB.COM </a>
</p>
7 字符实体