1、给图像或其他元素添加"alt"属性,来提供一条相对应的文字描述。 eg:<img src="xxx.jpg" alt="图片描述" />。
2、为所在页面的head元素内添加字符集设置描述:<meta http-equiv="Content-Type" content="text/html;charset=xxx" />
3、id选择器:#idName ;类选择器:.className。 派生选择器:#idName h2{......}
4、IE7和IE8中支持属性选择器:eg:[title]{color:blue;}
5、属性和值选择器:[title=hello world]{color:red} 为title值为hello world的所有应用该样式
[title~=hello]{color:red} 为title的值中包含单独hello的对象应用此样式。
6、input[type="text"]{......}
input[type="button"]{......}
7、HTML中的<hr /> 是用来分割上下结构的“水平线”。
8、将css文件引入html中的用法:<head> <link rel="stylesheet" type="text/css" href="xxx.css" /> </head> 外部样式表
内部样式表:<head> <script type="text/css"> ...... </script> </head>
9、