代码名称 代码说明
网页元素
doctype 网站声明
<html>…</html> html标记
<head>…</head> 头部标记
meat(name http-equiv) 网页属性说明
<title>…</title> 网页标题
<body>…</body> 网页主体标记
文本标记
font-size 文本大小
font-weight 文本粗细
color 文本颜色
font-family 字体
font-style 文本样式
blockquote 文本缩进
strong 文本加粗
italic 文本倾斜
px 像素
<p>…</p> 段落
<h1>……<h6> 标题
<br> 换行符
align 文本对齐方式
center 居中对齐
left 左对齐
right 右对齐
justify 两端对齐
表格标记
<table>…</table>
<caption>…</caption> 表格标题
<tr>…</tr> 行
<td>…</td> 列
<th>…</th> 表格的表头
border 边框
cellpadding 填充
cellspacing 间距
bordercolor 边框颜色
background 背景图片
bgcolor 背景颜色
width 宽度
height 高度
valign 垂直位置
链接标记
<a>…</a> 超链接标记
href 链接路径
target 链接目标
a:link 正常超链接样式
a:visited 访问过的超链接
a:hover 鼠标悬浮超链接样式
a:active 按下鼠标时超链接样式
text-decoration 修饰
层标记
div 层标签
apdiv 绝对元素div
span 也是层标签
position 位置
left 层距离左边距离
top 层距离顶部距离
z-index z轴大小
background-image 背景图片
visibility 可见性
background-color 背景颜色
inherit 继承父层的可见性
visible 一直可见
hidden 隐藏
表单标记
<form>…</form> 表单标记
action 动作
method 方法
enctype mime类型
<label>…</label> 插入表单对象标记
submit 提交表单
reset 重设表单
value 值
其他标记
img 插入图片标记
src 插入图片路径
<object>…</object> 插入媒体文件对象标记
<embed>…</embed> 视频、音频标记
hr 水平线
CSS样式代码
类型代码
font-family 字体
font-size 大小
font-style 样式
line-height 行高
font-weight 粗细
font-variant 变体
text-transform 大小写
color 颜色
text-decoration 修饰
背景代码
background-color 背景颜色
background-image 背景图片
background-repeat 重复
background-attachment 附件(固定、滚动)
background-position 位置(水平、垂直)
区块代码
word-spacing 单词间距
letter-spacing 字母间距
vertical-align 垂直对齐
text-align 文本对齐方式
text-indent 文字缩进
white-space 空格
display 显示
方框代码
width 宽度
height 高度
float 浮动
clear 清除(一般不使用)
padding 填充(内容与边界的距离)
padding-top 内容距离上边界多远
padding-right 内容距离右边界多远
padding-bottom 内容距离下边界多远
padding-left 内容距离左边界多远
margin 边界(整个方框与外部的距离)
margin-top 方框距离上面多远
margin-right 方框距离右边多远
margin-bottom 方框距离下边多远
margin-left 方框距离左边多远
边框代码
border-top-style 上边框样式
border-right-style 右边框样式
border-bottom-style 下边框样式
border-left-style 左边框样式
border-top-width 上边框宽度
border-right-width 右边框宽度
border-bottom-width 下边框宽度
border-left-width 左边框宽度
border-top-color 上边框颜色
border-right-color 右边框颜色
border-bottom-color 下边框颜色
border-left-color 左边框颜色
列表代码
list-style-type 列表类型
list-style-image 项目符号图像
list-style-position 列表位置
定位代码(对层使用)
position 位置或者类型(绝对、固定)
visibility 显示(可见、隐藏)
width 宽度
z-index z轴大小
height 高度
overflow 溢出(内容满了以后的状态)
top 距离上边多远
right 距离右边多远
bottom 距离下边多远
left 距离左边多远
clip 剪辑(上下左右剪掉相应的大小)
扩展代码
page-break-before 分页之前样式
page-break-after 分页之后样式
cursor 鼠标样式
filter 过滤器(暂时不知道怎么用)