Serlok App
Kode Text editor html
Kode Text editor html
https://gowmovie.blogspot.com/2025/08/demo-html-editor.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>HTML Editor</title> <style> body { font-family: Arial, sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; height: 100vh; margin: 0; padding: 20px; background-color: #f4f4f4; } textarea { width: 80%; height: 300px; font-family: Consolas, monospace; font-size: 14px; margin-bottom: 20px; padding: 10px; border: 1px solid #ccc; border-radius: 5px; background-color: #fff; } iframe { width: 80%; height: 500px; border: 1px solid #ccc; border-radius: 5px; } button { padding: 10px 20px; background-color: #4CAF50; color: white; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; } button:hover { background-color: #45a049; } </style> </head> <body> <h1>Simple HTML Editor</h1> <textarea id="htmlCode" placeholder="Write your HTML code here..."></textarea> <button onclick="runCode()">Run Code</button> <h2>Output</h2> <iframe id="output"></iframe> <script> function runCode() { var code = document.getElementById("htmlCode").value; var iframe = document.getElementById("output"); var doc = iframe.document || iframe.contentDocument || iframe.contentWindow.document; doc.open(); doc.write(code); doc.close(); } </script> </body> </html>
Select All
Copy
Tidak ada komentar:
Posting Komentar
Posting Lebih Baru
Posting Lama
Beranda
Beranda
Lihat Demo
Serlok App
Tentang
Tidak ada komentar:
Posting Komentar