<!doctype html> <html> <head><title>JavaScript Copy to Clipboard</title></head> <body> <textarea id="text">Hello World</textarea> <br> <button id="copy">Copy Textarea</button> <script src="copy.js"></script> </body> </html>