Web技术 第三章作业
3.5 Create and test an XHTML document that has six short paragraphs of text that describe variousaspects of the state in which you live. You must define three different paragraph styles, p1, p2,and p3. The p1 style must use left and right margins of 20 pixels, a background color of pink, and a foreground color of blue. The p2 style must use left and right margins of 30 pixels, a background color of black, and a foreground color of yellow. The p3 style must use a text indent of 1 centimeter, a background color of green, and a foreground color of white. The first and fourth paragraph must use p1, the second and fifth must use p2, and the third and sixth must use p3.
———————————作业3.5—————————————
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
web技术的三个关键技术        <title>Where I live</title>
        <style type="text/css">
            p.one {
                margin-left:20px;
                margin-right:20px;
                background-color:pink;
                color:blue;
            }
            p.two {
                margin-left:30px;
                margin-right:30px;
                background-color:black;
                color:yellow;
            }
            p.three {
                text-indent:1in;
                background-color:green;
                color:white;
            }
        </style>
    </head>
    <body>
        <h2 align="center">The province in where I live</h2>
        <p class="one">
            1.Hebei province, short for "ji", is named after the north of the Yellow River.
        </p>
        <p class="two">
            2. Hebei is located in the central plains region, and the culture is profound and profound.
        </p>
        <p class="three">
            3. Hebei province, shijiazhuang, tangshan, qinhuangdao, handan, xingtai, baoding,
zhangjiakou, chengde, cangzhou, langfang, hengshui and other 11 prefectural cities, the provincial capital is shijiazhuang.
        </p>
        <p class="one">
            4. Hebei is one of the birthplaces of the Chinese nation.
        </p>
        <p class="two">
            5. Hebei province has a total of 930 provincial cultural relics protection units, ranking first in the country.
        </p>
        <p class="three">
            6. Hebei province expressway has a total mileage of more than 1,600 kilometers, ranking 3rd in the national province.
        </p>
    </body>
</html>
结果截图:

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。