label { position: absolute; left: 10px; } #LABEL_16 { top: 25px; <input type="text" name="phone" id="INPUT_15" /> <label for="modal_phone" > Телефон <span>*</span> </label> <br> <input type="text" name="phone" id="INPUT_15" /> <label for="modal_phone" id="LABEL_16"> Телефон <span>*</span> </label> How to make that when you click on the label field disappeared. And if you click on the next input, then the previous label should appear if the text was not entered. The same should happen when clicking outside the input (label appears if there are no values)