html inside textarea
<textarea rows="20" cols="50" class="txtarea"> <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title></title> </head> <body> <h1>This is a basic html</h1> </body> </html> </textarea> <style> .txtarea{ /* Your Style Here */ } </style>