SparkJS Logo
HomeBeginnerHTML & CSS Basics

🎨 HTML & CSS Basics

Build beautiful web pages with HTML structure and CSS styling

⏱️ 4 hours📚 10 sections⭐ Beginner

Your Progress

0 / 10 completed

📚 Lessons

📄

What is HTML?

HTML (HyperText Markup Language) is the skeleton of every website! It defines the structure and content - like headings, paragraphs, images, and buttons. Think of it as the building blocks of your game's interface!

💻 Code Example:

<!-- Basic HTML structure -->
<!DOCTYPE html>
<html>
  <head>
    <title>My Awesome Game</title>
  </head>
  <body>
    <h1>Welcome to Space Invaders!</h1>
    <p>Use arrow keys to move and space to shoot!</p>
    <button>Start Game</button>
  </body>
</html>

<!-- HTML uses tags with angle brackets -->
<tagname>Content goes here</tagname>

<!-- Most tags need opening and closing -->
<h1>This is a heading</h1>
<p>This is a paragraph</p>

<!-- Some tags are self-closing -->
<img src="player.png" />
<br />

💡 Tip: Create an HTML file and open it in your browser to see these styles in action!

📝 Key Points:

  • HTML is the structure of web pages
  • Uses tags with angle brackets <>
  • Most tags need opening and closing