html语言,是不限制标签的大小写,一般用小写表示
生成一个元素框,他会填充父元素的内容区,旁边不能有其他元素。p,div
display:block
在文本行内生成元素框,不能打断这行文件,
display:inline
<link rel="stylesheet" href="sheet1.css" type="text/css">
在css中引入,其他的css文件,使用@import url()
就是在标签里面使用style
html使用style标签
比如p,a,h1
*{
color:red;
}
让每个元素的color都是red。
*.warning{
font-weight:bold
}
#lead-para{
font-weight:bold
}
bold的样式会应用到class属性为warning的所有元素
h1[class] {
color:silver;
}
a[href][title]{
font-weight:bold
}
a[href="http://www.baidu.com"]{
font-weight:bold
}
要选择带有class属性(值不限)的所有h1元素,使其文本为银色
同时将href和title属性的超链接的html文本为粗体
具体值href,的a标签文本为粗体
html是根元素