<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>8.10作业</title>
</head>
<style>
#blue{width: 100px;height: 100px;background: blue;}
.green{width: 100px; height: 100px;background: green;}
a[ href="http://www.php.cn/" ]{color: red;}
a{color: yellow;}
</style>
<body>
<div id="box">
<a href="http://www.php.cn/">php中文网</a>
<a href="http://www.baidu.com">百度</a>
<div id="blue"><a>php</a></div>
<div class="green"></div>
</div>
</body>
</html>
总结:css标签用法:id(# )class(.)