Back to Tools
HTML Online Viewer
Real-time HTML editor and preview
Home
All Tools
HTML Online Viewer
HTML Editor
Lines: 90
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>HTML Online Viewer</title> <style> body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; margin: 0; padding: 40px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; color: white; } .container { max-width: 800px; margin: 0 auto; text-align: center; } h1 { font-size: 3rem; margin-bottom: 1rem; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); } .feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-top: 3rem; } .feature-card { background: rgba(255,255,255,0.1); padding: 2rem; border-radius: 12px; backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.2); transition: transform 0.3s ease; } .feature-card:hover { transform: translateY(-5px); } .feature-icon { font-size: 2.5rem; margin-bottom: 1rem; } </style> </head> <body> <div class="container"> <h1>Welcome to HTML Online Viewer</h1> <p>Edit this HTML, CSS, and JavaScript in real-time!</p> <div class="feature-grid"> <div class="feature-card"> <div class="feature-icon">⚡</div> <h3>Real-time Preview</h3> <p>See your changes instantly as you type</p> </div> <div class="feature-card"> <div class="feature-icon">🎨</div> <h3>Modern Editor</h3> <p>Syntax highlighting and code formatting</p> </div> <div class="feature-card"> <div class="feature-icon">📱</div> <h3>Responsive Design</h3> <p>Works perfectly on all device sizes</p> </div> </div> </div> <script> console.log('Hello from the HTML Online Viewer!'); // Add some interactivity document.addEventListener('DOMContentLoaded', function() { const cards = document.querySelectorAll('.feature-card'); cards.forEach(card => { card.addEventListener('click', function() { this.style.background = 'rgba(255,255,255,0.2)'; setTimeout(() => { this.style.background = 'rgba(255,255,255,0.1)'; }, 200); }); }); }); </script> </body> </html>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Live Preview