HTML & CSS Explained

Ever wondered how websites are built? Letโ€™s break it down with the two basic building blocks: HTML and CSS. Donโ€™t worryโ€”itโ€™s easier than it sounds! ๐Ÿ˜Ž



What is HTML?

HTML = HyperText Markup Language. Itโ€™s the skeleton of every webpage.

  • ๐Ÿ—๏ธ Structure: HTML tells the browser what goes where (titles, paragraphs, images, buttons).
  • ๐Ÿ”— Links: Lets you click from one page to another.
  • ๐Ÿ–ผ๏ธ Images & videos: Embed pictures, GIFs, or YouTube clips.
  • ๐Ÿ“ Forms: Boxes where you type things (like login, signup, or search).

Example:

Here we have very simple html for one page with an image of my cat being distracting.

<html>
    <body>
        <h1>Hello World!</h1>
        <p>This is my first website.</p>
        <img src="cat.jpg" alt="Cute cat">
    </body>
</html>

Think of HTML like the โ€œbonesโ€ of your website. Click here to see what this html creates (Yes, that is my cat).

๐ŸŽจ What is CSS?

CSS = Cascading Style Sheets. It makes websites look good.

  • ๐ŸŽจ Colors: background, text, buttonsโ€”you name it.
  • ๐Ÿ–‹๏ธ Fonts: choose styles, sizes, boldness, etc.
  • ๐Ÿ“ Layouts: arrange boxes side-by-side or stacked.
  • โœจ Effects: hover animations, transitions, shadows.

Example:

Now lets add some css to make it a little prettier!


body {
  background-color: #5E5694;
}

h1 {
  color: #1b1655;
  text-align: center;
  font-size: 60px;
}

p {
  font-size: 40px;
  font-family: Arial, sans-serif;
  text-align: center;
  color: #1b1655;
}

img {
  display: table;
  margin: auto;
}

Think of CSS like the โ€œclothes and styleโ€ of your website. Click here to see how adding this css code changes the page!

How HTML & CSS Work Together ๐Ÿค

HTML builds the content & structure, while CSS adds style & personality. Put them together and you get beautiful, functional websites. โœจ


๐ŸŒŸ Starter Ideas with HTML + CSS
  • ๐Ÿ“ฐ Personal Homepage โ€“ introduce yourself with text + images.
  • ๐Ÿ“ธ Photo Gallery โ€“ a page showing your favorite pictures.
  • ๐Ÿ“… Event Invite โ€“ make a stylish page for a birthday or school event.
  • ๐Ÿ›’ Fake Storefront โ€“ show items with prices & styled โ€œbuyโ€ buttons.
  • ๐ŸŽจ Custom Portfolio โ€“ show off projects, artwork, or hobbies.

๐Ÿ‘‰ Start simple: one page, one color scheme, one image. Then add more style as you go! ๐Ÿš€