Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> input::-moz-selection { color: #1c87c9; background-color: #eee; } input::selection { color: #1c87c9; background-color: #eee; } textarea::-moz-selection { color: white; background-color: #8ebf42; } textarea::selection { color: white; background-color: #8ebf42; } </style> </head> <body> <p>Input element</p> <form> <input type="text" value="Select this input text" /> </form> <p>Textarea element</p> <textarea rows="5" cols="25">Select this textarea text</textarea> </body> </html>