html-初学

来源:互联网 发布:android编程颜色表 编辑:程序博客网 时间:2024/06/05 19:18


Html 小实例代码 下载DW打开。可用浏览器观看实际网页效果(兼容性有差距)


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>小实例</title>
<style>
#box{
width:300px;
height:215px;

}
#title {
width:114px;
height:29px;
border-top:2px solid #206f96;
border-right:1px solid #0F9;
border-left:1px solid #0F9;
background:#FFC;


}
#content{
width:298px;
height:182px;
border:1px solid #F03;
}
#content1{
width:298px;
height:57px;
background:#FC3 url(img/baidu2.gif) no-repeat 16px 5px;
}
#content2{
width:298px;
height:125px;
background:#C9F url(img/smile.gif) no-repeat 20px 51px;
}
</style>
</head>


<body>
<div id="box">
<div id="title"></div>
    <div id="content">
    <div id="content1"></div>
    <div id="content2"></div>
    </div>
</div>
</body>
</html>