Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> input[type="checkbox"] { -webkit-appearance: none; /* remove default appearance on Webkit-based browsers */ -moz-appearance: none; /* remove default appearance on Mozilla-based browsers */ appearance: none; /* remove default appearance on all other browsers */ width: 20px; height: 20px; border: 2px solid #333; border-radius: 3px; outline: none; cursor: pointer; margin-right: 10px; } input[type="checkbox"]:checked:before { content: "\2714"; /* Unicode checkmark symbol */ display: block; text-align: center; font-size: 14px; line-height: 16px; color: #fff; background-color: #333; border-radius: 2px; width: 20px; height: 20px; } </style> </head> <body> <input type="checkbox" id="myCheckbox" name="myCheckbox" /> <label for="myCheckbox">Checkbox</label> </body> </html>