HTML

来源:互联网 发布:json和js对象的区别 编辑:程序博客网 时间:2024/06/06 01:12
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>

<!-- comment -->


tag:

<h1></h1> <h2></h2> <h3></h3> ...    h--header
<p></p>                              p--paragragh  
<ul> <li></li> </ul>                 unordered list
<ol> <li></li> </ol>                 ordered list
<a></a>                              
<img />                              img是self-closing
<strong></strong>
<em></em>                            em--emphasize
<table>
<thead> <tr> <th></th> </tr> </thead>  <th colspan="3"></th>
<tbody> <tr> <td></td> </tr> </tbody>  td--table data
</table>
<div></div>                          div--division   分块
<span></span>                        span 小范围


attribute:

style="font-size:10px; font-family:Arial; color:red; background-color:blue; text-align:left; width:50px; height:50px"
href  <a href=""> </a>
src   <img src="" />      




CSS 使HTML修改方便,多个html使用

HTML
<head>
<link type="text/css" rel="stylesheet" href="stylesheet.css" />      <link />是self-closing
</head>
<body>
<p>test</p>
</body>


stylesheet.css
p {font-size:40px}


CSS格式:  
selector{                       selector是h1、p、table、span 即tag去掉<>
property:value;
}


/* css comment */


十进制 0-9
十六进制 0-9,A-F

color:#BEA45F  
color:#cc6666
6位数,不区分大小写


h1{
   font-size: 10px;
   font-family: Verdana, sans-serif, serif;      按序检测使用
   color:#cc0000;                               CSS定义以分号结尾
}

p{
   font-size: 10px;
   font-family: ..., ..., ...;
   color:#cc0000;
   text-align: left;
}

div{
    background-color:#cc0000;
    height:100px;
    width: 100px;
}

table{
      border: 1px solid red;
}

a{
  color: #cc0000;
  text-decoration: none;    去下划线
}

img{
    height: 100px;
    width: 300px;
    
    border: 1px solid #4682b4;
}


div<class="">
.head

0 0