Skip to main content

Command Palette

Search for a command to run...

๐Ÿง  Day 8 โ€“ Stepping into CSS: Styling the Web!

Published
โ€ข3 min read
๐Ÿง  Day 8 โ€“ Stepping into CSS: Styling the Web!
V

๐Ÿ‘‰ Currently an ABAP developer switching lanes into MERN full-stack ๐Ÿš€. Writing blogs to document my journey, share learnings, and stay consistent. Chai lover โ˜•, gamer ๐ŸŽฎ, streamer ๐ŸŽฅ & YouTuber ๐ŸŽฌ.

Hey everyone ๐Ÿ‘‹,
Today marks Day 8 of my web development journey, and trust me, things are getting more colorful (literally). I officially started learning CSS โ€” Cascading Style Sheets.

๐ŸŽจ What is CSS?

CSS stands for Cascading Style Sheets, and itโ€™s the magic that brings life to our dull HTML pages. If HTML is the body, CSS is the outfit โ€” it gives your webpage color, shape, and style.

I also learned why CSS is important โ€” it helps separate content from design, making websites cleaner, more efficient, and way easier to maintain.


๐Ÿ”— Connecting CSS with HTML

Before writing any CSS, I learned how to link my CSS file with an HTML file using the <link> tag in the <head> section.
I even took a screenshot of it โ€” because that small line of code finally made my webpage look alive.

<link rel="stylesheet" href="style.css">


โš™๏ธ My First CSS Boilerplate

Hereโ€™s the simple boilerplate code I started with โ€” it basically resets all the default browser styling and sets up a clean base for every project:

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body{
    height: 100%;
    width: 100%;
    background-color: azure;
}

I know itโ€™s simple, but for a beginner, this felt like unlocking the first door to web design!


โœ๏ธ Text Properties in CSS

Next, I explored text properties โ€” and this is where things really got creative.
Hereโ€™s what I practiced:

  • font-size โ€“ controls how big or small text appears (measured in px for pixels).

  • font-family โ€“ changes the style of the text (like choosing between Arial or Poppins).

  • font-weight โ€“ defines the thickness of the text.

  • font-style โ€“ for making text italic or normal.

  • color โ€“ well, self-explanatory ๐ŸŽจ

  • text-align โ€“ aligns the text (left, right, center).

  • text-transform โ€“ used to change case (uppercase, lowercase, capitalize).


๐Ÿ†” IDs vs Classes

This concept really clicked for me once I related it to real life ๐Ÿ‘‡

  • ID is like a student roll number โ€” unique to each person.

  • Class is like a college name โ€” many students can belong to the same class.

In CSS, IDs are called using # and Classes using .

Example:

#student{
  color: blue;
}

.college{
  color: green;
}

I even made a screenshot for this part โ€” because thatโ€™s where I finally understood the logic.


๐Ÿ”ค Custom Fonts with @font-face

Finally, I learned how to use custom fonts downloaded from websites like Google Fonts or DaFont.
Using the @font-face rule, I can now bring any typography I like into my project โ€” no more boring default fonts! ๐Ÿ˜Ž

Example:

@font-face {
    font-family: 'MyFont';
    src: url('myfont.ttf');
}

๐Ÿ’ฌ Final Thoughts

Day 8 was truly fun โ€” I realized CSS isnโ€™t just about colors and fonts; itโ€™s about expressing creativity through code.
Next up, Iโ€™m planning to dive deeper into selectors, colors, and layout techniques โ€” so stay tuned for more!

If youโ€™re learning CSS too, drop a comment and share your favorite CSS property ๐Ÿ’ฌ

More from this blog

Blackwind Dev Journal

19 posts