关于HTML的两个实例

例子一:使用HTML语言编写一个菜单

代码如下:

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>菜谱</title>
</head>
<body>
<table border="1">
    <tr>
        <th colspan="5">星期一菜谱</th>
    </tr>
    <tr>
        <th rowspan="2">素菜</th>
        <th colspan="3">清炒茄子</th>
        <th>花椒扁豆</th>
    </tr>
    <tr>
        <th colspan="3">小葱豆腐</th>
        <th>炒白菜</th>
    </tr>
    <tr>
        <th rowspan="2">荤菜</th>
        <th colspan="3">油闷大虾</th>
        <th>海参鱼翅</th>
    </tr>
    <tr>
        <th colspan="3">红烧肉</th>
        <th>烤全羊</th>
    </tr>
</table>
</body>
</html>

例子二:使用HTML语言编写一个课程表

代码如下:

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>课程表</title>
</head>
<body>
<table border="1">
    <tr>
        <th>项目</th>
        <th colspan="5" >上课</th>
        <th colspan="2">休息</th>
    </tr>
    <tr>
        <th>星期</th>
        <th>星期一</th>
        <th>星期二</th>
        <th>星期三</th>
        <th>星期四</th>
        <th>星期五</th>
        <th>星期六</th>
        <th>星期日</th>
    </tr>
    <tr>
        <th rowspan="4">上午</th>
        <th>语文</th>
        <th>数学</th>
        <th>英语</th>
        <th>英语</th>
        <th>物理</th>
        <th>计算机</th>
        <th rowspan="4">休息</th>
    </tr>
    <tr>
        <th>数学</th>
        <th>数学</th>
        <th>地理</th>
        <th>历史</th>
        <th>化学</th>
        <th>计算机</th>
    </tr>
    <tr>
        <th>化学</th>
        <th>语文</th>
        <th>体育</th>
        <th>历史</th>
        <th>地理</th>
        <th>计算机</th>
    </tr>
    <tr>
        <th>政治</th>
        <th>英语</th>
        <th>体育</th>
        <th>历史</th>
        <th>地理</th>
        <th>计算机</th>
    </tr>
    <tr>
        <th rowspan="2">下午</th>
        <th>语文</th>
        <th>数学</th>
        <th>英语</th>
        <th>英语</th>
        <th>物理</th>
        <th>计算机</th>
        <th rowspan="2">休息</th>
    </tr>
    <tr>
        <th>数学</th>
        <th>数学</th>
        <th>地理</th>
        <th>历史</th>
        <th>化学</th>
        <th>计算机</th>
    </tr>

</table>
</body>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值