<div class="required"> <label>Name:</label> <input type="text"> </div> <style> .required:after { content:" *"; } </style>