HTML标签属性
HTML文档声明
<!DOCTYPE html>
meta标签
<meta />
<meta name="keywords" content="HTML学习、前端开发基础知识" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta charset="utf-8" />
<meta http-equiv="refresh" content="6;url=http://www.baidu.com" />
name属性值
| 属性值 | 描述 |
|---|
| keywords | 网页关键字、可多个 |
| description | 网页的描述 |
| author | 网页的作者 |
| copyright | 版权信息 |
http-equiv属性值
| 属性值 | 描述 |
|---|
| Content-Type | 定义网页所使用的编码 |
| refresh | 定义网页自动刷新跳转 |
ol标签/ul标签
<ol type="属性值">
<li>列表项</li>
<li>列表项</li>
<li>列表项</li>
</ol>
<ul type="属性值">
<li>列表项</li>
<li>列表项</li>
<li>列表项</li>
</ul>
有序列表Type属性值
| 属性值 | 列表项符号 |
|---|
| 1 | 阿拉伯数字:1、2、3……(默认值) |
| a | 小写英文字母:a、b、c…… |
| A | 大写英文字母:A、B、C…… |
| i | 小写罗马数字:i、ii、iii…… |
| I | 大写罗马数字:I、II、III…… |
无序列表Type属性值
| 属性值 | 列表项符号 |
|---|
| disc | 实心圆(默认值) |
| circle | 空心圆 |
| square | 实心正方形 |
td标签
<tr>
<td rowspan="2">合并行属性:rowspan</td>
</tr>
<tr>
<td colspan="2">合并列属性:colspan</td>
</tr>
img标签
<img src="" alt="" title="" >
<img src="img/images_1.png">
a标签
<a href="链接地址" target="打开方式">please Enter!<a>
target属性
| 属性值 | 描述 |
|---|
| _self | 在原来窗口打开链接(默认值) |
| _blank | 在新窗口打开链接 |
| _parent | 在父窗口打开链接 |
| _top | 在顶层窗口打开超链接 |
表单
form标签属性
<form></form>
| 属性 | 描述 |
|---|
| name | 表单名称 |
| method | 提交方式 |
| action | 提交地址 |
| target | 打开方式 |
| enctype | 编码方式 |
name属性
<form name="myForm"></form>
method属性
<form method="get"></form>
<form method="post"></form>
action属性
<form action="index.php"></form>
target属性
<form target="_blank"></form>
enctype属性
input标签
<input type="表单类型" />
| 属性值 | 描述 |
|---|
| text | 单行文本框 |
| password | 密码文本框 |
| radio | 单选框 |
| checkbox | 复选框 |
| button / submit / reset | 按钮 |
| file | 文件上传 |
| search | 搜索框 |
单行/密码 文本框属性
<input type="text" />
<input type="password" />
| 属性 | 描述 |
|---|
| value | 文本框默认值 |
| size | 文本框长度 |
| maxlength | 设置单行文本框最多字符数 |
| placeholder | 不可修改的默认显示 文本 |
单选框/复选框
<input type="radio">
<form>
性别:
<label><input type="radio" name="gender" value="man" checked />男</label>
<label><input type="radio" name="gender" value="woman" />女</label>
</form>
<input type="checkbox">
<form>
你快乐吗?:
<label><input type="checkbox" name="gender" value="18" />18岁以前你快乐吗?</label>
<label><input type="checkbox" name="gender" value="24" />24岁以前你快乐吗?</label>
<label><input type="checkbox" name="gender" value="36" />36岁以前你快乐吗?</label>
</form>
按钮
普通按钮
<input type="button" value="取值" />
提交按钮
<input type="submit" value="取值" />
重置按钮
<input type="reset" value="取值" />
文件上传
<input type="flie" />
textarea标签(多行文本框)
<textarea rows="行数" cols="列数" value="取值">文本内容</textarea>
下拉列表
<select>
<option>选项内容</option>
…………
<option>选项内容</option>
</select>
下拉列表由<select></select>标签和<option></option>标签配合使用来显示的
select标签属性
| 属性 | 描述 |
|---|
| multiple | 设置下拉列表可以选择多项 |
| size | 设置显示几个列表项(整数不小于四) |
option标签属性
搭起我的HTML框架,载入你的CSS,再进行岁月版的Javascript演变。————流亦