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