Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> .green::-moz-selection { background-color: #8ebf42; } .green::selection { background-color: #8ebf42; } .yellow::-moz-selection { background-color: #ffcc00; } .yellow::selection { background-color: #ffcc00; } </style> </head> <body> <p>This is a text with the default selection background-color.</p> <p class="green">Select this text to see a green background.</p> <p class="yellow">Select this text to see a yellow background.</p> </body> </html>