label標簽主要用於綁定一個表單元素,當點擊label標簽的時候,被綁定的表單元素就會獲得輸入焦點。
<div class="form-group col-lg-12">
<label class="control-label col-lg-3 text-right" for="start_time">有效期:</label>
<input class="form-control-erbi col-lg-2" type="text" id="start_time" name="start_time" placeholder='開始時間' autocomplete="off"/>
<label class="control-label" style="float:left;display: block;" for="end_time"> 至 </label>
<input class="form-control-erbi col-lg-2" type="text" id="end_time" name="end_time" placeholder='結束時間' autocomplete="off"/>
</div>
span標簽被用來組合文檔中的行內元素。