[英]Stray start tag label.HTML validation
I tried to validate the code and receive the following error: 我试图验证代码并收到以下错误:
Stray start tag label.
杂散开始标签标签。
In all 3 label. 在所有3个标签中。
CODE HTML: 代码HTML:
<div class="col-md-3 target-col desc-marketing" >
<label >Targeted Lists</label>
<div class="select-style" id="targeted-list">
<select class="form-control">
<option id="sendToAll" value="1">
<label for="sendToAll">Send To All Patients</label> </option>
<option id="sendToAllLeads" value="2">↩
<label for="sendToAllProspect">Send To All Prospects</label>
</option>
<option id="sendToAllLeads2" value="3">
<label for="sendToAllLeads">Send To All Leads</label>
</option>
</select>
</div>
<span id="or">OR</span>
</div>
The origin of this error and how can I solve it? 此错误的起因以及如何解决?
Thank you in advance! 先感谢您!
You can't have labels inside an <option>
tag. 您不能在
<option>
标记内包含标签。 Place the <label>
tag outside : 将
<label>
标记放在外面:
<label for="sendTo">Targeted Lists</label>
<div class="select-style" id="targeted-list">
<select class="form-control" id="sendTo">
<option id="sendToAll" value="1">Send To All Patients</option>
<option id="sendToAllLeads" value="2">Send To All Prospects</option>
<option id="sendToAllLeads2" value="3">Send To All Leads</option>
</select>
</div>
If you want to customise the look of your label, use a class on the option, that's all. 如果要自定义标签的外观,请在选项上使用一个类,仅此而已。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.