html制作四季网页

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <table border="1" style="width: 630px; margin: 20px auto 20px auto" >
        <tr>
            <td rowspan="4"><h1 style="width:36px">四季古诗</h1></td>
            <td><h1>春</h1></td>
            <td>
                <img src=" spring.jpg" width="275" height="240" />
            </td>
            <td>
                <h2 style="text-align:center">春晓</h2>
                <p align="center">
                    孟浩然<br />
                </p>
                <p align="center">
                    春眠不觉晓,处处闻啼鸟。<br />
                </p>
                <p align="center">
                    夜来风雨声,花落知多少。
                </p>
            </td>
        </tr>

        <tr>
            <td><h1>夏</h1></td>
            <td>
                <img src="summer.jpg" width="275" height="240" />
            </td>
            <td>
                <h2 style="text-align:center">晓出净慈寺送林子方</h2>
                <p align="center">
                    杨万里<br />
                </p>
                <p align="center">
                    毕竟西湖六月中,风光不与四时同。<br />
                </p>
                <p align="center">
                    接天莲叶无穷碧,映日荷花别样红。
                </p>
            </td>
        </tr>

        <tr>
        <td><h1>秋</h1></td>
        <td>
            <img src="autumn.jpg" width="275" height="240"/>
        </td>
            <td>
            <h2 style="text-align:center">山居秋暝</h2>
            <p align="center">
                王维<br />
            </p>
            <p align="center">
                空山新雨后,天气晚来秋。<br />
            </p>
            <p align="center">
                明月松间照,清泉石上流。<br />
            </p>
            <p align="center">
                竹喧归浣女,莲动下渔舟。<br />
            </p>
            <p align="center">
                随意春芳歇,王孙自可留。
            </p>
        </td>
      </tr>

        <tr>
            <td><h1>冬</h1></td>
            <td>
                <img src="winter.jpg" width="275" height="240" />
            </td>
            <td>
                <h2 style="text-align:center">江雪</h2>
                <p align="center">
                    柳宗元<br />
                </p>
                <p align="center">
                    千山鸟飞绝,万径人踪灭。<br />
                </p>
                <p align="center">
                    孤舟蓑笠翁,独钓寒江雪
                </p>
            </td>
        </tr>
    </table>
</body>
</html>

 

 

 

以下是一个简单的春夏秋冬主题网页HTML代码示例,其中包含了图片: ```html <!DOCTYPE html> <html> <head> <title>Seasons</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> body { background-color: #f2f2f2; font-family: Arial, sans-serif; color: #333; } h1 { text-align: center; font-size: 36px; margin-top: 50px; } .season { margin: 50px; padding: 20px; background-color: #fff; box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); } .spring { background-color: #b3e6ff; } .summer { background-color: #ffd699; } .autumn { background-color: #ffcccc; } .winter { background-color: #e6f2ff; } .season h2 { font-size: 24px; margin-bottom: 10px; } .season p { font-size: 18px; line-height: 1.5; margin-bottom: 20px; } .season img { display: block; margin: 20px auto; max-width: 100%; height: auto; box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); } </style> </head> <body> <h1>Seasons</h1> <div class="season spring"> <h2>Spring</h2> <img src="spring.jpg" alt="Spring"> <p>Spring is a season of new beginnings. It is the time of year when flowers bloom, trees bud, and the weather gets warmer. It's a great time to go outside and enjoy nature.</p> </div> <div class="season summer"> <h2>Summer</h2> <img src="summer.jpg" alt="Summer"> <p>Summer is a season of fun and relaxation. It's the time of year when people go on vacation, swim in the pool, and enjoy outdoor activities. It's a great time to be with friends and family.</p> </div> <div class="season autumn"> <h2>Autumn</h2> <img src="autumn.jpg" alt="Autumn"> <p>Autumn is a season of change. It's the time of year when the leaves change color, the air gets cooler, and people start to wear sweaters. It's a great time to go for a walk and enjoy the beauty of nature.</p> </div> <div class="season winter"> <h2>Winter</h2> <img src="winter.jpg" alt="Winter"> <p>Winter is a season of cold and snow. It's the time of year when people celebrate holidays like Christmas and New Year's Eve. It's a great time to stay inside and drink hot cocoa by the fire.</p> </div> </body> </html> ``` 在这个例子中,与之前的示例相比,增加了`<img>`元素来插入季节相关的图片。在CSS样式中,对图片进行了简单的设置,包括设置图片的最大宽度、高度自适应和阴影效果。这样,在浏览器中打开这个网页时,就可以看到四季主题的图片和描述了。需要注意:这个例子中的图片是需要提前准备好并放在同级目录下的。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值