HTML and CSS Basic (For Beginners)

 ðŸ–¥️ What is HTML and CSS? (For Complete Beginners)

Imagine you are building a house.

  • 🧱 HTML is like the structure of the house — the walls, the roof, the doors, and the windows.
    It decides what things are there on your webpage: like text, images, buttons, and headings.

  • 🎨 CSS is like the paint, decorations, and furniture — the colors, the style of the text, the layout, and how things look.
    It decides how everything should look to make it nice and pretty.


📄 What is HTML?

HTML stands for HyperText Markup Language.
It’s the language used to build the basic structure of a webpage.

For example, if you want to add a title, a paragraph, or a picture, you use HTML.

Here’s a tiny example:

<h1>Hello World</h1>

<p>This is my first website!</p>

This tells the browser:

  • h1 = heading (big title)

  • p = paragraph (normal text)


🎨 What is CSS?

CSS stands for Cascading Style Sheets.
It’s used to style your HTML.
Want your title to be blue and centered? Want your paragraph to be bold and bigger? That’s what CSS is for!

Here’s an example:


h1 { color: blue; text-align: center; } p { font-size: 18px; font-weight: bold; }

This makes the heading blue and centered, and the paragraph bold and a bit bigger.


💡 Simple Example Together

Let’s put HTML and CSS together:


<!DOCTYPE html> <html> <head> <style> h1 { color: red; } p { font-size: 20px; } </style> </head> <body> <h1>Welcome to My Website</h1> <p>I’m learning HTML and CSS!</p> </body> </html>

🔹 The HTML says what is on the page.
🔹 The CSS says how it looks.



Comments