<html><head><base href="https://websimcreationengine.com/"><title>Web Design in 4 Minutes - Interactive Tutorial</title><meta name="viewport" content="width=device-width, initial-scale=1"><style>
body {
font-family: 'Roboto', sans-serif;
line-height: 1.6;
color: #333;
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
h1, h2 {
color: #1a1a1a;
}
.container {
display: flex;
flex-direction: column;
min-height: 100vh;
}
.content {
flex: 1;
}
.step {
margin-bottom: 30px;
padding: 20px;
border: 1px solid #e0e0e0;
border-radius: 5px;
background-color: #f9f9f9;
}
.step h2 {
margin-top: 0;
}
.code-editor {
background-color: #1e1e1e;
color: #d4d4d4;
padding: 15px;
border-radius: 5px;
font-family: 'Courier New', monospace;
margin-bottom: 15px;
}
.preview {
border: 1px solid #ccc;
padding: 15px;
margin-top: 15px;
background-color: white;
}
button {
background-color: #4CAF50;
border: none;
color: white;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
border-radius: 4px;
}
button:hover {
background-color: #45a049;
}
footer {
text-align: center;
margin-top: 50px;
padding: 20px;
background-color: #f1f1f1;
}
</style></head><body>
<div class="container">
<header>
<h1>Web Design in 4 Minutes - Interactive Tutorial</h1>
<p>Learn the basics of web design by following along with this interactive guide!</p>
</header>
<main class="content">
<div class="step" id="step1">
<h2>Step 1: Content Structure</h2>
<p>Let's start with the basic HTML structure. Edit the code below to add a heading and a paragraph:</p>
<div class="code-editor" contenteditable="true">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Web Page</title>
</head>
<body>
<!-- Add your content here -->
</body>
</html>
</div>
<button onclick="updatePreview('step1')">Update Preview</button>
<div class="preview" id="preview1"></div>
</div>
<div class="step" id="step2">
<h2>Step 2: Styling with CSS</h2>
<p>Now, let's add some basic CSS to improve the look of our page. Add styles for the body and headings:</p>
<div class="code-editor" contenteditable="true">
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.6;
color: #333;
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
h1 {
color: #1a1a1a;
}
</style>
</div>
<button onclick="updatePreview('step2')">Update Preview</button>
<div class="preview" id="preview2"></div>
</div>
<div class="step" id="step3">
<h2>Step 3: Adding Color</h2>
<p>Let's add some color to make our design more appealing. Modify the CSS to include a background color and link styles:</p>
<div class="code-editor" contenteditable="true">
<style>
body {
background-color: #f4f4f4;
}
a {
color: #3498db;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
</div>
<button onclick="updatePreview('step3')">Update Preview</button>
<div class="preview" id="preview3"></div>
</div>
<div class="step" id="step4">
<h2>Step 4: Layout and Spacing</h2>
<p>Finally, let's improve the layout and spacing of our elements:</p>
<div class="code-editor" contenteditable="true">
<style>
.container {
display: flex;
flex-direction: column;
min-height: 100vh;
}
main {
flex: 1;
}
footer {
text-align: center;
margin-top: 50px;
padding: 20px;
background-color: #333;
color: white;
}
</style>
</div>
<button onclick="updatePreview('step4')">Update Preview</button>
<div class="preview" id="preview4"></div>
</div>
</main>
<footer>
<p>Congratulations! You've completed the Web Design in 4 Minutes tutorial.</p>
</footer>
</div>
<script>
function updatePreview(stepId) {
const codeEditor = document.querySelector(`#${stepId} .code-editor`);
const preview = document.querySelector(`#${stepId} .preview`);
preview.innerHTML = codeEditor.innerText;
}
// Initialize previews
document.addEventListener('DOMContentLoaded', () => {
['step1', 'step2', 'step3', 'step4'].forEach(stepId => updatePreview(stepId));
});
</script>
</body></html>