qq_慕姐5507113
2021-03-20 09:05
<input>和<input/>哪种写法正确?
xhml 是<input/>
html是<input>
但是一般使用<input/>
和版本有关,不过html5官方文档推荐空标签更推荐使用<input>这样的方式
Void elements only have a start tag;
Then, if the element is one of the void elements, or if the element is a foreign element, then there may be a single "/" (U+002F) character. This character has no effect on void elements, but on foreign elements it marks the start tag as self-closing.
Void elements: area, base, br, col, embed, hr, img, input, keygen, link, meta, param, source, track, wbr
类似于<br>/<br/>的版本问题吧,应该都能用
初识HTML(5)+CSS(3)-升级版
1225309 学习 · 18230 问题
相似问题