1
元素-属性-格式化:
<body bgcolor = "" backgroud="" > 背景颜色 背景图片
<b> </b>
<big> </big>
<em> </em>
<i> </i>
<small> </small>
<strong> </strong>
<sub> </sub>
<sup> </sup>
<ins> </ins>
<del> </del>
</br>
<h1 align="center|left|right"> </h1>
<p> </p>
<img src=""> </img>
<a href="http://www.baidu.com" target = "_self|_blank"> </a> !!!必须有http
2
HTML5样式:
(1) 外部样式:(通常都是在head进行写,因为方便调整)
<link rel="stylesheet" type="text/css" href="test1.css">
其中test1.css:
h1{
color:red;
}
h2{
color:pink;
}
(2) 内部样式:
<style type="text/css">
p{
color:yellow;
}</style>
(3) 内联样式表:
<h3 style="color:#0F9;">Third</h3>
HTML5链接:
文本链接:
<a href="http://www.baidu.com" target="_blank">Click Here</a>
图片链接:
<a href="Test.html"><img src="head2.jpg" width="100px" height="100px" alt="TestLogo"></a>
属性:name(用来创建文档内的链接)
<a name="top">Hello</a>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<a href="#top">Change to Hello</a>
3
HTML5表格使用
border:表格的框。
<table border="1">
caption:表格的题目。
<caption>
Head
</caption>
tr,th:分别代表表格行与表格头。
<tr>
<th >Head1</th>
<th >Head2</th>
<th >Head3</th>
</tr>
td,cellpadding,background:分别代表单元格,单元格的延伸,背景图片。
<table border="5" cellpadding="20" background="head2.jpg">
cellspacing,bgcolor:单元格之间的空隙,单元格内的背景颜色。
<table border="5" cellspacing="10" bgcolor="blue">
colspan,align:一个单元格可以横跨所占的列数,单元格内排列的方式。
<td colspan="3" align="center">Cell444</td>
rowspan:单元格可以竖跨所占的列数。
<td rowspan="2">