开发者

Nested html dl dt dd

I want to check my thinking. I nee开发者_JS百科d to create HTML code for the UI design below and I have used nested dls in my markup. Is this semantically valid? If not, how else should I implement this design in HTML?

UI design

<dl>
    <dt>Section one</dt>
    <dd>
        <dl>
            <dt>Sub-Section one</dt>
            <dd>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis justo justo, aliquam vel imperdiet a, semper sed felis. Nunc nec odio non massa pellentesque blandit et in velit. Proin massa libero, pulvinar at consectetur ut, ullamcorper id ipsum. Mauris in lorem ligula. </dd>

            <dt>Sub-Section two</dt>
            <dd>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis justo justo, aliquam vel imperdiet a, semper sed felis. Nunc nec odio non massa pellentesque blandit et in velit. Proin massa libero, pulvinar at consectetur ut, ullamcorper id ipsum. Mauris in lorem ligula. </dd>

            <dt>Sub-Section three</dt>
            <dd>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis justo justo, aliquam vel imperdiet a, semper sed felis. Nunc nec odio non massa pellentesque blandit et in velit. Proin massa libero, pulvinar at consectetur ut, ullamcorper id ipsum. Mauris in lorem ligula. </dd>

            <dt>Sub-Section four</dt>
            <dd>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis justo justo, aliquam vel imperdiet a, semper sed felis. Nunc nec odio non massa pellentesque blandit et in velit. Proin massa libero, pulvinar at consectetur ut, ullamcorper id ipsum. Mauris in lorem ligula. </dd>

            <dt>Sub-Section five</dt>
            <dd>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis justo justo, aliquam vel imperdiet a, semper sed felis. Nunc nec odio non massa pellentesque blandit et in velit. Proin massa libero, pulvinar at consectetur ut, ullamcorper id ipsum. Mauris in lorem ligula. </dd>
        </dl>
    </dd>

    <dt>Section two</dt>
    <dd>etc..</dd>

    <dt>Section three</dt>
    <dd>etc..</dd>

    <dt>Section four</dt>
    <dd>etc..</dd>
</dl>


I would probably have used nested unordered lists using h* tags for the section titles, but your DL use seems fine. People debate constantly about what is the proper use of DLs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜