如何使用HTML布局web页面?(代码示例)

发布时间:2022-05-16 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了如何使用HTML布局web页面?(代码示例)脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
本篇文章给大家带来的内容是介绍如何使用HTML布局web页面?(代码示例)。有一定的参考价值有需要的朋友可以参考一下,希望对你们有所帮助。

一, 效果图。

如何使用HTML布局web页面?(代码示例)

二,代码。

<!DOCTYPE html>
<html>

<head>
    <;meta charset="utf-8">
    <tITle>html 列表</title>
</head>

<body>
    <!--使用div元素的网页布局-->
    <div id="container" style="width:500px">
        <div id="header" style="">>
            <h1 style="margin-bottom:0">main title o f web page</h1>
        </div>
        <div id="menu" style="height:200px;width:100px;float:left">
            <b>menu</b>
            <br> html
            <br> css
            <br> javascript
        </div>
        <div id="content" style="height:200px;width:400px;float:left">
            ontent goes here
        </div>
        <div id="footer" style="clear:both;text-align:center">
            Copyright © W3CSchool.cc
        </div>
        <!--使用table元素的网页布局-->
        <table width="500" border="0">
            <tr>
                <td colspan="2" style="">>
                    <h1>main title of web page</h1>
                </td>
            </tr>
            <tr>
                <td style="width:100px">
                    <b>menu</b>
                    <br>html
                    <br>css
                    <br>javascript</td>
                <td style="height:200px;width:400px">
                    content goes here</td>
            </tr>
            <tr>
                <td colspan="2" style="text-align:center">
                    Copyright © W3CSchool.cc</td>
            </tr>
        </table>
</body>

</html>


参考资料:《菜鸟教程》

以上就是如何使用HTML布局web页面?(代码示例)的详细内容,更多请关注脚本宝典其它相关文章!

脚本宝典总结

以上是脚本宝典为你收集整理的如何使用HTML布局web页面?(代码示例)全部内容,希望文章能够帮你解决如何使用HTML布局web页面?(代码示例)所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签:HTML