๐Ÿ“– Theory: HTML + CSS for Building a Complete Web Project

This module introduces students to the fundamentals and advanced concepts of HTML and CSS. It is structured for deep learning through practical examples and real-world applications.

๐Ÿงฑ 1. What is HTML?

HTML (HyperText Markup Language) is the standard language for creating the structure of web pages.

๐Ÿ”น Key Concepts:

๐Ÿ’ก Example:

<!DOCTYPE html>
<html>
  <head>
    <title>My First Page</title>
  </head>
  <body>
    <h1>Hello, world!</h1>
    <p>This is my first HTML page.</p>
  </body>
</html>

๐ŸŽจ 2. What is CSS?

CSS (Cascading Style Sheets) is used to style and visually format HTML content.

๐Ÿ”น Key Concepts:

๐Ÿ’ก Example:

body {
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
}

๐Ÿ“ 3. The Box Model

Every HTML element is a box with four layers: Content โ†’ Padding โ†’ Border โ†’ Margin

[ margin ]
  [ border ]
    [ padding ]
      [ content ]

๐Ÿ“Œ 4. Layout Techniques

๐Ÿ”น Block vs Inline Elements:

๐Ÿ”น Layout Systems:

โš™๏ธ 5. Responsive Design

Responsive websites adapt to different screen sizes and devices.

๐Ÿ”น Tools and Techniques:

Media Queries:

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }
}

๐ŸŒ 6. Semantic HTML

Use meaningful, descriptive tags for better structure and accessibility:

โœ… Benefits:

๐Ÿงฐ 7. File Structure of a Website

project/
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ about.html
โ”œโ”€โ”€ contact.html
โ”œโ”€โ”€ styles/
โ”‚   โ””โ”€โ”€ main.css
โ”œโ”€โ”€ images/
โ”‚   โ””โ”€โ”€ logo.png
โ””โ”€โ”€ scripts/
    โ””โ”€โ”€ script.js

๐Ÿ›  8. Developer Tools

๐Ÿš€ 9. Publishing with GitHub Pages

๐Ÿ”น Steps:

  1. Push your site to a public GitHub repository
  2. Go to Settings โ†’ Pages
  3. Choose the branch (main) and folder (/root or /docs)
  4. GitHub provides a live link like:
    https://yourusername.github.io/your-project/

๐ŸŽฏ Summary

โžก๏ธ Now you're ready to move on to examples and exercises to reinforce what you've learned.