Thuộc tính placeholder hiển thị gợi ý (hint) bên trong ô nhập liệu (<input>, <textarea>) trước khi người dùng nhập. Mất đi khi focus/nhập dữ liệu.
Ví dụ
<!DOCTYPE html>
<html>
<body>
<h2>Đăng ký</h2>
<form action="/new.php">
<input type="text" placeholder="Tên đăng nhập" name="name"><br>
<input type="password" placeholder="Mật khẩu" name="password"><br><br>
<input type="submit" value="Gửi">
</form>
</body>
</html>
Lưu ý: Placeholder không thay thế nhãn <label> (accessibility). Dùng cả hai: label cho màn hình đọc, placeholder cho gợi ý ví dụ.