批改状态:不合格
老师批语:
以下代码是HTML语言与CSS语言构成的一个案例。
<!doctype html> <!-- xml xhtml声明 --><!-- ctrl+/ -->
<html>
<head> <!-- 定义网页头部 -->
<meta charset="utf-8">
<title>8.10作业</title>
<link rel="stylesheet" type="text/css" href="xxx.css"><!-- 外部样式:为了共享-->
<link rel="shortcut icon" type="image/x-icon" href="xxximage.png"> <style type="text/css">/* 内部样式:只针对当前页面*//* *tag标签名,ID名(名字前面加#) class名(名字前加点.)属性选择器*/ body{}/* 标记选择器*/
#box{width: 100px;height: 100px;background:pink;}/* ID选择器*/
.main{width: 100px;height: 100px;background:green;}/* 类class选择器*/
a{colar:red;}
a[href="http://php.cn"]{coler:blue;}
a[href="demo2.html"]{color: pink;}
div a{coler:#000}
#box a{}
</style>
</head>
<body><!-- 内联样式 style="background:blue;"-->
<img src="">
<a href="https://baidu.com">百度</a>
<a href="http://php.cn">php中文网</a>
<a href="http://demo2.html">demo2</a>
<a href="#">#</a>
<div id="box">
<a href="">php</a>
</div>
<div class="main"></div>
<div></div>
<div></div>
</body>
</html>点击 "运行实例" 按钮查看在线实例
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号