XHTML strict span inside label is semantic

南笙酒味 提交于 2019-12-23 07:46:03

问题


I'm using XHTML strict. I want to put a SPAN tag inside LABEL tag. Is it correct way?

<label>Username <span>*</span></label><input type="text" .... />

回答1:


label is an inline element therefore can contain other inline elements like span. So this is correct XHTML.



来源:https://stackoverflow.com/questions/3657629/xhtml-strict-span-inside-label-is-semantic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!