为块级元素添加链接

HTML5允许网页设计人员在包含子元素的块级元素添加<a>元素。浙江使整块变成一个链接。

<html>
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </head>
    <body>
        <div>TODO write content</div>
        <a href='introduction.html'>
            <article>
                <figure>
                    <img src='images/bok-choi.jpg' alt='Bok Choi' />
                    <figcaption>Bok Choi</figcaption>
                </figure>
                <hgroup>
                    <h2>Japanese Vegetarian</h2>
                    <h3>Five week course in London</h3>
                </hgroup>
                <p>Afive week introduction to traditional Japanese vegetarian meals, teaching you a selection od rice and noodle dishes.</p>
            </article>
        </a>
    </body>

 

posted @ 2018-08-13 16:25  梦人亭  阅读(213)  评论(0编辑  收藏  举报