๐Ÿ‘‘ Build Your Empire
๐Ÿ“ HTML & CSS Editor
๐Ÿ‘๏ธ Live Preview

Every successful business has a big sign that tells customers who they are! In HTML, we use <h1> tags to make BIG, important text - perfect for your business name!

๐Ÿ—๏ธ HTML Tags = Building Blocks

HTML uses special words called tags wrapped in angle brackets < >. Think of them like sandwich bread - you need a top slice and a bottom slice!

<h1>Mario's Pizza Palace</h1>
๐Ÿฅช
Sandwich Rule: Opening tag <h1> on top, your content in the middle, closing tag </h1> with the / on the bottom!

๐Ÿ‘‘ Your Empire Challenge

Create your business sign! Type your business name "Your Business" wrapped in <h1> tags!

index.html
1
๐Ÿ‘๏ธ Live Preview
๐Ÿ“ฃ

Tell Customers What You Sell!

Your business slogan & description

Great businesses tell customers why they're awesome! Now we'll add a slogan using the <p> (paragraph) tag.

๐Ÿ’ฌ Famous Business Slogans

๐ŸŸ
"I'm Lovin' It"
โœ”๏ธ
"Just Do It"
๐ŸŽฏ
"Expect More"

๐Ÿ“ The Tags You Need

  • <h1> - Your BIG business name
  • <p> - Your slogan or description
<h1>Mario's Pizza Palace</h1> <p>The best pizza in town since 2024!</p>

๐Ÿ‘‘ Your Empire Challenge

Create your business name in <h1> AND add a catchy slogan in <p> tags! Make customers want to visit Your Business!

index.html
1 2 3
๐Ÿ‘๏ธ Live Preview
๐Ÿ—๏ธ

Build Your Store!

Every business needs a proper building!

You wouldn't open a store without walls and a roof, right? Websites need structure too! Let's build the foundation of your business website.

๐Ÿช Your Store Blueprint

<!DOCTYPE html> <html> <head> <title>Mario's Pizza Palace</title> </head> <body> <h1>Welcome to Mario's!</h1> <p>Best pizza in town!</p> </body> </html>
๐Ÿฌ
Think of your store:
โ€ข <html> = The entire building
โ€ข <head> = The back office (business name on the browser tab)
โ€ข <body> = The store floor (what customers see!)
๐Ÿ“„
Website Page
๐Ÿท๏ธ
Browser Tab
๐Ÿ‘€
Customer View

๐Ÿ‘‘ Your Empire Challenge

Build the complete structure for Your Business! Include your business name in the <title> AND <h1>!

index.html
1 2 3 4 5 6 7 8 9 10
๐Ÿ‘๏ธ Live Preview
๐ŸŽจ

Brand Your Empire!

Make your store stand out with colors!

Every successful business has brand colors! McDonald's has red & yellow, Starbucks has green. What colors will Your Business have?

๐Ÿช Famous Brand Colors

๐ŸŸ
Red & Yellow
โ˜•
Green
๐Ÿ“˜
Blue

๐ŸŽฏ CSS = Your Design Tool

CSS lets you control colors, sizes, and more!

h1 { color: red; }
๐Ÿ’ก
CSS goes in <style> tags! Put it in the <head> section, like this:
<style> h1 { color: red; } </style>

๐Ÿ‘‘ Your Empire Challenge

Choose a brand color for Your Business! Add <style> tags and make your h1 heading colorful!

index.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14
๐Ÿ‘๏ธ Live Preview
โœจ

Design Your Storefront!

Make customers say "WOW!"

Time to make Your Business look professional! A great storefront attracts customers!

๐Ÿช Complete Store Design

body { background-color: lightyellow; font-family: Arial; text-align: center; } h1 { color: darkred; font-size: 48px; } p { color: gray; font-size: 20px; }

๐ŸŽจ Choose Your Brand Colors

tomato gold purple deepskyblue limegreen hotpink coral navy
๐Ÿ’ผ
CEO Tip: Pick colors that match what you sell!
๐Ÿ• Pizza โ†’ red, orange
๐Ÿง Bakery โ†’ pink, brown
๐ŸŽฎ Games โ†’ purple, blue
๐Ÿ• Pets โ†’ green, yellow

๐Ÿ‘‘ Your Empire Challenge

Design the complete storefront for Your Business! Include:

  • A background-color for your store
  • A color for your business name
  • Style for your slogan too!
index.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
๐Ÿ‘๏ธ Live Preview
๐Ÿ’พ

Protect Your Empire!

Save your business files safely!

Smart business owners back up their work! Git is like a magical vault that saves every version of your website. If something breaks, you can go back!

๐ŸŽฎ Git = Video Game Save Points

Just like saving in Minecraft or Fortnite - you can always go back to your last save if something goes wrong!

๐Ÿ’ผ Business Backup Commands

$ git init
๐Ÿ“ Created backup vault for Your Business

$ git add .
๐Ÿ“‹ Selected all business files

$ git commit -m "My business website!"
โœ… Save point created!
๐Ÿ’ผ
CEO Commands:
โ€ข git init - Create your vault
โ€ข git add . - Pick files to protect
โ€ข git commit - Lock them in the vault!

๐Ÿ‘‘ Your Empire Challenge

Protect Your Business! Type all three git commands to create your first save point!

Terminal
1 2 3
๐Ÿ“Ÿ Terminal Output
Waiting for commands...
๐Ÿš€

Grand Opening Day!

Launch your business to the WORLD!

๐ŸŽ‰ This is it! The moment every business owner dreams of - GRAND OPENING! With git push, your website goes LIVE for the whole world to see!

๐ŸŒ
Global Reach
24/7
Always Open
โˆž
Visitors

๐ŸŒ GitHub = Your Business HQ

GitHub hosts your website FOR FREE! Millions of businesses use it!

๐ŸŽŠ Launch Command

$ git push -u origin main
๐Ÿš€ Uploading Your Business...
๐Ÿ“ก Connecting to servers worldwide...
๐ŸŽ‰ YOUR BUSINESS IS NOW LIVE!
๐Ÿ‘‘
After you push:
โ€ข Your website is on the internet!
โ€ข Friends & family can visit!
โ€ข You're officially a web developer AND business owner!

๐Ÿ‘‘ Final Empire Challenge

Launch Your Business to the world! Type the push command!

Terminal
1
๐Ÿ“Ÿ Terminal Output
Ready to deploy...
๐Ÿ‘‘

Official Business License

This certifies that the owner of

Your Business

has successfully built their Business Empire Website

Mastering the skills of:

๐Ÿ“ HTML ๐ŸŽจ CSS ๐Ÿ“ฆ Git
๐Ÿ†๐ŸŽ‰๐Ÿš€๐Ÿ’ผ๐Ÿ‘‘

Established:

๐ŸŽ‰ Your Empire is LIVE!

Congratulations, CEO! You now have the skills to build websites for ANY business! Keep building, keep learning, keep growing your empire!

1
Website Built
3
Skills Learned
โˆž
Future Potential
๐Ÿช

Store Built โœ…

HTML structure complete!

๐ŸŽจ

Brand Designed โœ…

CSS styling mastered!

๐Ÿš€

Launched โœ…

Git deployed!

๐ŸŒŸ What's Next for Your Empire?

๐Ÿ–ผ๏ธ

Add Images

Show your products!

๐Ÿ”—

Add Links

Connect pages!

๐Ÿ“ฑ

Go Mobile

Phone-friendly!

๐Ÿ†
Achievement Unlocked!
You did something amazing!
`, updated: new Date().toISOString() }; projects.unshift(project); saveProjects(); openProject(project); } // Open a project in the editor function openProject(project) { if (typeof project === 'string') { project = JSON.parse(project.replace(/"/g, '"')); } currentProject = project; document.getElementById('project-title-input').value = project.name; document.getElementById('code-editor').value = project.code; updatePreview(); document.getElementById('projects-view').style.display = 'none'; document.getElementById('editor-view').classList.add('active'); document.getElementById('empty-state').style.display = 'none'; updateProjectsList(); } // Close editor and return to projects view function closeEditor() { if (currentProject) { saveProject(); } currentProject = null; document.getElementById('projects-view').style.display = 'block'; document.getElementById('editor-view').classList.remove('active'); loadProjects(); } // Save current project function saveProject() { if (!currentProject) return; currentProject.name = document.getElementById('project-title-input').value || 'Untitled Project'; currentProject.code = document.getElementById('code-editor').value; currentProject.updated = new Date().toISOString(); saveProjects(); renderProjects(); updateProjectsList(); } // Delete a project function deleteProject(id, event) { if (event) event.stopPropagation(); if (confirm('Are you sure you want to delete this project?')) { projects = projects.filter(p => p.id !== id); if (currentProject && currentProject.id === id) { closeEditor(); } saveProjects(); renderProjects(); updateProjectsList(); } } // Download project as HTML file function downloadProject() { if (!currentProject) return; saveProject(); const blob = new Blob([currentProject.code], { type: 'text/html' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = `${currentProject.name.replace(/[^a-z0-9]/gi, '_')}.html`; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); } // Update live preview function updatePreview() { const code = document.getElementById('code-editor').value; const iframe = document.getElementById('preview-iframe'); if (iframe && code) { const doc = iframe.contentDocument || iframe.contentWindow.document; doc.open(); doc.write(code); doc.close(); } // Auto-save after 2 seconds of no typing if (currentProject) { clearTimeout(window.autoSaveTimeout); window.autoSaveTimeout = setTimeout(() => { saveProject(); }, 2000); } } // Render projects grid function renderProjects() { const grid = document.getElementById('projects-grid'); const emptyState = document.getElementById('empty-state'); if (projects.length === 0) { if (grid) grid.innerHTML = ''; if (emptyState) emptyState.style.display = 'block'; return; } if (emptyState) emptyState.style.display = 'none'; if (!grid) return; grid.innerHTML = projects.map(project => { const date = new Date(project.updated); const preview = project.code.substring(0, 200).replace(/<[^>]*>/g, ''); const projectJson = JSON.stringify(project).replace(/"/g, '"'); return `
๐Ÿ‘‘
${escapeHtml(project.name)}
Updated: ${date.toLocaleDateString()}
${escapeHtml(preview)}...
`; }).join(''); } // Update sidebar projects list function updateProjectsList() { const list = document.getElementById('projects-list'); if (!list) return; if (projects.length === 0) { list.innerHTML = '
No projects yet
'; return; } list.innerHTML = projects.slice(0, 10).map(project => { const isActive = currentProject && currentProject.id === project.id; const projectJson = JSON.stringify(project).replace(/"/g, '"'); return ` ${escapeHtml(project.name)} `; }).join(''); } // Escape HTML to prevent XSS function escapeHtml(text) { const div = document.createElement('div'); div.textContent = text; return div.innerHTML; } // Load tip of the day async function loadTipOfDay() { try { const response = await fetch('data/computer-facts.json'); if (!response.ok) throw new Error('Failed to load tips'); const facts = await response.json(); const today = new Date(); const dayOfYear = Math.floor((today - new Date(today.getFullYear(), 0, 0)) / 1000 / 60 / 60 / 24); const factIndex = dayOfYear % facts.length; const tipElement = document.getElementById('tip-text'); if (tipElement) { tipElement.textContent = facts[factIndex].fact; } } catch (e) { console.error('Error loading tip:', e); const tipElement = document.getElementById('tip-text'); if (tipElement) { tipElement.textContent = '๐Ÿ’ก Start building your portfolio today! Every project you create is a step toward showcasing your creativity.'; } } } // Initialize document.addEventListener('DOMContentLoaded', () => { loadProjects(); loadTipOfDay(); // Set up code editor listener const editor = document.getElementById('code-editor'); if (editor) { editor.addEventListener('input', updatePreview); } // Set up title input listener const titleInput = document.getElementById('project-title-input'); if (titleInput) { titleInput.addEventListener('blur', saveProject); } // Sidebar collapse functionality const leftBtn = document.getElementById('collapse-left-btn'); const rightBtn = document.getElementById('collapse-right-btn'); const leftSidebar = document.getElementById('sidebar-left'); const rightSidebar = document.getElementById('sidebar-right'); const dashboard = document.getElementById('dashboard-container'); let leftCollapsed = false; let rightCollapsed = false; function updateDashboardClass() { if (!dashboard) return; dashboard.classList.remove('left-collapsed', 'right-collapsed', 'both-collapsed'); if (leftCollapsed && rightCollapsed) { dashboard.classList.add('both-collapsed'); } else if (leftCollapsed) { dashboard.classList.add('left-collapsed'); } else if (rightCollapsed) { dashboard.classList.add('right-collapsed'); } } if (leftBtn && leftSidebar) { leftBtn.addEventListener('click', () => { leftCollapsed = !leftCollapsed; if (leftCollapsed) { leftSidebar.classList.add('collapsed'); leftBtn.innerHTML = 'โ–ถ'; } else { leftSidebar.classList.remove('collapsed'); leftBtn.innerHTML = 'โ—€'; } updateDashboardClass(); }); } if (rightBtn && rightSidebar) { rightBtn.addEventListener('click', () => { rightCollapsed = !rightCollapsed; if (rightCollapsed) { rightSidebar.classList.add('collapsed'); rightBtn.innerHTML = 'โ—€'; } else { rightSidebar.classList.remove('collapsed'); rightBtn.innerHTML = 'โ–ถ'; } updateDashboardClass(); }); } });