批改状态:合格
                        老师批语:手写代码补上!
                    
                            <!DOCTYPE html>
<html>
<head><!-- 定义网页头部 -->
	<title>PHP中文网——杨科的博客</title>
	<meta charset="utf-8"><!-- charset字符编码 -->
    <link rel="stylesheet" type="text/css" href="static/style.css">
    <!-- 外部样式,为了共享 -->
    <!-- link标签,定义文档与外部资源的关系 -->
    <!-- stylesheet文档的外部样式表 -->
    <!-- type属性超链接的目标地址 -->
    <link rel="shortcut icon" type="image/x-icon" href="images/yang.jpg">
    <style type="text/css"> /*内部样式,只针对当前页面*/
    body{} 
    /*标记选择器*/
    #box{width:100px;height:100px;background:pink; }
    /*id选择器*/
    /*width定义宽度*/
    /*height定义高度*/
    /*background定义背景,底色*/
    /*pink代表粉红色*/
    .main{width:100px;height: 100px;background-color: green;}
    /*class选择器*/
    /*green背景色定义为绿色*/
    a{color:red;}
    a[href="http://www.php.cn/"]{color:blue;}
    a[href="domo2.html"]{color:pink;}
    div a{color:#000;}
    </style>
</head>
<body>
<!-- 内联样式 style="background: blue" -->
<img src="">
<a href="www.baidu.com">百度网站</a>
<a href="www.php.cn">php中文网</a>
<a href="demo2.html">demo2</a>
<a href="#">#</a>
<div id="box">
    <a href="">php</a>
</div>
<div class="main"> </div>
</body>
</html>点击 "运行实例" 按钮查看在线实例
小结:
Html是一种超文本标记语言,<>标签是成对出现的,成对出现的标签称之为元素,以<>开头,</>结尾,标签中间的东西叫做元素内容,没有元素内容的称为单标签,即空元素。Css是一种层叠样式表,分为内部样式,外部样式,还有内联样式
                Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号