当前位置:文档之家› HTML实验案例

HTML实验案例

<tr>
<th&h>
<th>年龄</th>
</tr>
<tr>
<td>王林</td>
<td>男</td>
<td>25</td>
</tr>
</table>
12、设置表格的标题
<table border=“1”>
<caption align=“top”>旅游日程</caption>
HTML实验案例
1、编写标题
如下面实例,理解HTML中的标题标签<hn>,其中n为标题的等级,HTML总共提供六个等级的标题,n越小,标题字号就越大,以下列出所有等级的标题(其中n的取值为1到6)。
<html>
<head>
<title>标题</title>
</head>
<body>
<h1>一号标题</h1>
</body>
</html>
小问题:当Size的设置超出范围的时候,例如设置成Size = 10的情况下会出现什么问题?
6、文字的字体与样式
<html>
<head>
<title>字体</title>
</head>
<body>
<center>
<p><font face="楷体_gb2312">欢迎光临</font></p>
<p><font face="宋体">欢迎光临</font></p>
<p><font face="仿宋_gb2312">欢迎光临</font></p>
<p><font face="黑体">欢迎光临</font></p>
<p><font face="arial">welcome my homepage.</font></p>
<body
<p>这是第一条线段,无width设定,取width默认值100%来显示</p>
<br/>
<hr size=“3”/>
<p>这是第二条线段,width=50(点数方式)</p>
<br>
<hr width=“50”size=“5”/>
<p>这是第三条线段,width=50%(百分比方式)</p>
<td>100公斤</td>
</tr>
</table>
<br>
<table border=“0”width="250">
<caption>定货单</caption>
<tr>
<th>苹果</th>
<th>香蕉</th>
<th>葡萄</th>
</tr>
<tr>
<td>200公斤</td>
<td>200公斤</td>
<center>
<font color=“white”>色彩斑斓的世界</font>
<br/>
<font color=“red”>色彩斑斓的世界</font>
<br/>
<font color=“#00ffff”>色彩斑斓的世界</font>
<br/>
<font color=“#ffff00”>色彩斑斓的世界</font>
<hr/>
<p>这是第二条线段,size=5</p>
<br/>
<hr size=“5”/>
<p>这是第三条线段,size=10</p>
<br/>
<hr size=“10”/>
</body>
</html>
(2)线段长度的设定
<html>
<head>
<title>线段长度的设定</title>
</head>
<tr>
<th>日期</th>
<td>9-11</td>
<td>11-13</td>
<td>13-14</td>
</tr>
<tr>
<th>旅游地点</th>
<td>青岛</td>
<td>黄山</td>
<td>杭州</td>
</tr>
</table>
<br/><br/>
<table border=“1”>
8、编写无序号列表
<html>
<head>
<title>无序列表</title>
</head>
<body>
<p>这是一个无序列表:</p>
<ul>
国际互联网提供的服务有:
<li>WWW服务</li>
<li>文件传输服务</li>
<li>电子邮件服务</li>
<li>远程登录服务</li>
<li>其它服务</li>
</body>
</html>
5、文字的大小设置
<html>
<head>
<title>字号大小</title>
</head>
<body>
<font size=“7”>这是size=7的字体</font><p>
<font size=“6”>这是size=6的字体</font><p>
<font size=“5”>这是size=5的字体</font><p>
</html>
3、使用段落标签<p>
<html>
<head>
<title>段落标签</title>
</head>
<body>
<p align=“center”>登鹳雀楼</p>
<p align=“center”>白日依山尽,</p>
<p align=“left”>黄河入海流。</p>
<p align=“center”>欲穷千里目,</p>
<li>其它服务</li>
</ol>
</body>
</html>
10、编写定义性列表
<html>
<head>
<title>自定义序号项目列表</title>
</head>
<body>
<hr width="100%" height="10" noshade/>
<dl>
<dt>学院介绍</dt>
<dd>河南中医学院信息技术学院,是一个...</dd>
<head>
<title>无阴影的设定</title>
</head>
<body>
<p>这是第一条线段,无noshade设定,取默认值阴影效果来显示</p>
<br/>
<hr width=“80%”size=“5”/>
<p>这是第二条线段,有noshade设定</p>
<br>
<hr width=“80%”size=“7”noshade/>
<td>100公斤</td>
</tr>
</table>
(2)设置格间线宽度
<table border=“3”cellspacing=“5”>
<caption>定货单</caption>
相关主题