Create input as child of input

后端 未结 5 1200
猫巷女王i
猫巷女王i 2021-01-19 15:07

Is it possible to create a button that is the child of an text?


    

5条回答
  •  悲&欢浪女
    2021-01-19 15:53

    The correct answer is that the input tag is a void element that cannot have any children. Inline elements such as span can have children.

    Void elements only have a start tag; end tags must not be specified for void elements.

    i.e. in HTML5 there can never be a closing tag for an i.e. don't use . HTML5 is not XML and it strongly discourages self-closing tags (/>) i.e. is not strictly correct HTML5 (although it will work for compatibility purposes). The list of void element tags defined in HTML5 are: area, base, br, col, embed, hr, img, input, keygen, link, meta, param, source, track, wbr.

提交回复
热议问题