<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<table border="1" width="400" height="50%" bordercolor="green" bgcolor="yellow"
background="/images/test.png" cellpadding="5" cellspacing="5">
<!--bgcolor为整个表格或仅为一个单元格设置背景颜色,background为整个表设置背景图像或仅为一个单元设置背景图像,
bordercolor设置边框颜色,cellspacing定义单元格之间的空间,cellpadding表示单元格大小-->
<!--<thead>创建单独的表头,<tbody>表示表格的主体,<tfoot>创建一个单独的表页脚-->
<!--border为0则无边框-->
<caption>标题</caption>
<tr>
<th>Header 1</th>
<th>Header 2</th><!--表头单元格-->
</tr>
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
<td rowspan="2">Row 1 Cell 1</td><!--合并两行或更多行-->
<td colspan="3">Row 3 Cell 1</td><!--两个或多个列合并为一个列-->
</tr>
</table>
<ul style="list-style-type:disc" style="list-style-type:circle" style="list-style-type:square">
<!--圆、圈、方-->
<li>咖啡</li>
<li>茶</li>
<li>牛奶</li>
</ul><!--无序列表-->
<ol start="50" type="A" type="a" type="I" type="i">
<li>咖啡</li>
<li>茶</li>
<li>牛奶</li>
</ol><!--有序列表-->
<dl>
<dt>Coffee</dt>
<dd>- black hot drink</dd><!--定义-->
<dt>Milk</dt>
<dd>- white cold drink</dd>
</dl><!--自定义列表-->
<p>
我有一双<span style="color:gold">金色</span> 的
<span style="font-size:50px">大眼睛</span>。
</p><!--内联元素,可用作文本的容器-->
<div style="color:#00FFFF">
<h3>这是一个在 div 元素中的标题。</h3>
<p>这是一个在 div 元素中的文本。</p>
</div><!--块级元素,它是可用于组合其他 HTML 元素的容器-->
<div id="container" style="width:800px">
<div id="header" style="background-color:#FFA500;">
<h1 style="margin-bottom:0;">网页的主标题</h1>
</div>
<div id="menu" style="background-color:#FFD700;height:200px;width:100px;float:left;">
<b>Menu</b><br>
HTML<br>
CSS<br>
JavaScript
</div>
<div id="content" style="background-color:#EEEEEE;height:200px;width:700px;float:left;">
内容就在这里
</div>
<div id="footer" style="background-color:#FFA500;clear:both;text-align:center;">
Copyright © w3cschool.cn
</div>
</div><!--使用 <div> 元素添加布局-->
<table width="500" border="0">
<tr>
<td colspan="2" style="background-color:#FFA500;">
<h1>网页的主标题</h1>
</td>
</tr>
<tr>
<td style="background-color:#FFD700;width:100px;">
<b>Menu</b><br>
HTML<br>
CSS<br>
JavaScript
</td>
<td style="background-color:#eeeeee;height:200px;width:400px;">
内容就在这里
</td>
</tr>
<tr>
<td colspan="2" style="background-color:#FFA500;text-align:center;">
Copyright © w3cschool.cn
</td>
</tr>
</table><!--使用 <table> 元素添加布局-->
</body>
</html>
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<table border="1" width="400" height="50%" bordercolor="green" bgcolor="yellow"
background="/images/test.png" cellpadding="5" cellspacing="5">
<!--bgcolor为整个表格或仅为一个单元格设置背景颜色,background为整个表设置背景图像或仅为一个单元设置背景图像,
bordercolor设置边框颜色,cellspacing定义单元格之间的空间,cellpadding表示单元格大小-->
<!--<thead>创建单独的表头,<tbody>表示表格的主体,<tfoot>创建一个单独的表页脚-->
<!--border为0则无边框-->
<caption>标题</caption>
<tr>
<th>Header 1</th>
<th>Header 2</th><!--表头单元格-->
</tr>
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
<td rowspan="2">Row 1 Cell 1</td><!--合并两行或更多行-->
<td colspan="3">Row 3 Cell 1</td><!--两个或多个列合并为一个列-->
</tr>
</table>
<ul style="list-style-type:disc" style="list-style-type:circle" style="list-style-type:square">
<!--圆、圈、方-->
<li>咖啡</li>
<li>茶</li>
<li>牛奶</li>
</ul><!--无序列表-->
<ol start="50" type="A" type="a" type="I" type="i">
<li>咖啡</li>
<li>茶</li>
<li>牛奶</li>
</ol><!--有序列表-->
<dl>
<dt>Coffee</dt>
<dd>- black hot drink</dd><!--定义-->
<dt>Milk</dt>
<dd>- white cold drink</dd>
</dl><!--自定义列表-->
<p>
我有一双<span style="color:gold">金色</span> 的
<span style="font-size:50px">大眼睛</span>。
</p><!--内联元素,可用作文本的容器-->
<div style="color:#00FFFF">
<h3>这是一个在 div 元素中的标题。</h3>
<p>这是一个在 div 元素中的文本。</p>
</div><!--块级元素,它是可用于组合其他 HTML 元素的容器-->
<div id="container" style="width:800px">
<div id="header" style="background-color:#FFA500;">
<h1 style="margin-bottom:0;">网页的主标题</h1>
</div>
<div id="menu" style="background-color:#FFD700;height:200px;width:100px;float:left;">
<b>Menu</b><br>
HTML<br>
CSS<br>
JavaScript
</div>
<div id="content" style="background-color:#EEEEEE;height:200px;width:700px;float:left;">
内容就在这里
</div>
<div id="footer" style="background-color:#FFA500;clear:both;text-align:center;">
Copyright © w3cschool.cn
</div>
</div><!--使用 <div> 元素添加布局-->
<table width="500" border="0">
<tr>
<td colspan="2" style="background-color:#FFA500;">
<h1>网页的主标题</h1>
</td>
</tr>
<tr>
<td style="background-color:#FFD700;width:100px;">
<b>Menu</b><br>
HTML<br>
CSS<br>
JavaScript
</td>
<td style="background-color:#eeeeee;height:200px;width:400px;">
内容就在这里
</td>
</tr>
<tr>
<td colspan="2" style="background-color:#FFA500;text-align:center;">
Copyright © w3cschool.cn
</td>
</tr>
</table><!--使用 <table> 元素添加布局-->
</body>
</html>