Why use definition lists (DL,DD,DT) tags for HTML forms instead of tables?

前端 未结 11 1637
醉酒成梦
醉酒成梦 2020-12-02 06:29

I\'ve come across a few examples recently that do things like:

Full Name:
11条回答
  •  醉酒成梦
    2020-12-02 07:15

    Definition lists are almost never used because semantically speaking they rarely show up on the internet.

    In your case the correct code has been posted:

    You are creating a form with inputs and labels for said inputs, you are not setting forth a list of words and defining them.

    If you are doing some kind of help section then definition lists would be appropriate, e.g.:

    HTML
    Hypertext Markup Language
    CSS
    Cascade Stylesheets
    PHP
    Hypertext Preprocessor

提交回复
热议问题