【前端】HTML笔记(3)

<!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>

  • 4
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

足足一米58

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值