CodeLab
Tutorials For Everyone
Run
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Welcome to Codelab Editor</title> <style> * { box-sizing: border-box; } html, body { margin: 0; padding: 0; overflow: hidden; height: 100vh; font-family: 'Inter', sans-serif; background: #fff; } canvas { position: absolute; top: 0; left: 0; z-index: 0; } .container { position: relative; z-index: 2; background-color: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); border-radius: 0.75rem; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); padding: 2rem; max-width: 80rem; width: 90%; margin: auto; color: white; } .overlay-wrapper { position: relative; z-index: 1; height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 1rem; } .heading-gradient { font-size: 2.25rem; font-weight: 600; background-image: linear-gradient(to bottom, #2a73cc 70%, #153966); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 1.5rem; } .paragraph { font-size: 1.125rem; color: #999; margin-bottom: 2rem; } .button-group { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; } .gradient-button { background-image: linear-gradient(to bottom, #2a73cc 70%, #153966); text-decoration: none; color: white; font-weight: 600; padding: 0.75rem 1.5rem; border-radius: 5px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); transition: transform 0.3s ease-in-out, background-image 0.3s ease-in-out; cursor: pointer; border: none; display: inline-flex; align-items: center; justify-content: center; } .gradient-button:hover { transform: translateY(-2px); background-image: linear-gradient(to bottom, #2a73cc 90%, #153966); } .preview-card { margin-top: 2rem; padding: 1.5rem; background: rgba(0,0,0, 0.1); border-radius: 0.5rem; border: 1px solid rgba(255, 255, 255, 0.05); } .preview-title { font-size: 1.5rem; font-weight: 600; color: #2a73cc; margin-bottom: 1rem; } .preview-text { color: #999; } </style> </head> <body> <canvas id="canvas"></canvas> <div class="overlay-wrapper"> <div class="container"> <h1 class="heading-gradient">Welcome to Codelab Editor</h1> <p class="paragraph"> Code to life: HTML, CSS, JavaScript, and jQuery in real-time. </p> <div class="button-group"> <a href="html/" target="_blank" class="gradient-button">Learn HTML</a> <a href="css/" target="_blank" class="gradient-button">Explore CSS</a> <a href="/" target="_blank" class="gradient-button">More..</a> </div> <div class="preview-card"> <h2 class="preview-title">Live Preview Example</h2> <p class="preview-text">Type some HTML on the left side and see the output in real-time on the right side!</p> </div> </div> </div> <script> const canvas = document.getElementById('canvas'); const ctx = canvas.getContext('2d'); let balls = []; const numBalls = 30; function resizeCanvas() { canvas.width = window.innerWidth; canvas.height = window.innerHeight; initBalls(); } function initBalls() { balls = []; for (let i = 0; i < numBalls; i++) { balls.push({ x: Math.random() * canvas.width, y: Math.random() * canvas.height, vx: (Math.random() - 0.5) * 6, vy: (Math.random() - 0.5) * 6, r: 10 + Math.random() * 20, color: `hsl(${Math.random() * 360}, 70%, 60%)` }); } } function drawBall(ball) { ctx.beginPath(); ctx.arc(ball.x, ball.y, ball.r, 0, Math.PI * 2); ctx.fillStyle = ball.color; ctx.shadowColor = ball.color; ctx.shadowBlur = 20; ctx.fill(); } function update() { ctx.clearRect(0, 0, canvas.width, canvas.height); balls.forEach(ball => { ball.x += ball.vx; ball.y += ball.vy; if (ball.x + ball.r > canvas.width || ball.x - ball.r < 0) ball.vx *= -1; if (ball.y + ball.r > canvas.height || ball.y - ball.r < 0) ball.vy *= -1; drawBall(ball); }); requestAnimationFrame(update); } window.addEventListener('resize', resizeCanvas); resizeCanvas(); update(); </script> </body> </html>
Editor Commands
Ctrl
F
Find
Ctrl
G
Find Next
Ctrl
⇧
G
Find Previous
Ctrl
⇧
F
Find & Replace
Ctrl
]
Indent Code Right
Ctrl
[
Indent Code Left
⇧
Tab
Auto Indent Code
Ctrl
/
Line Comment
Ctrl
Alt
/
Block Comment
TutsInsider Actions
Alt
S
Run Code
Ctrl
C
Copy Editor Code
Ctrl
A
Select All Editor Code
Ctrl
S
Save/Download
Ctrl
Alt
X
Rotate
Ctrl
Alt
T
Switch Theme
Ctrl
⇧
C
Open Console
Esc
Close Console