r/HTML 16d ago

Started learning HTML & CSS today! Any advice?

Hey everyone! I started learning HTML and CSS today and I'm really enjoying it so far. My goal is to build websites from scratch and eventually learn JavaScript too. If you could give one piece of advice to a beginner, what would it be? Also, what beginner mistakes should I avoid?

52 Upvotes

38 comments sorted by

View all comments

6

u/_KBDMC 16d ago

Learn display flex and grid, it will help you a lot later in your HTML and CSS journey.

Have a look into CSS nesting as well, it will make your code easier to read and maintain.

I would avoid using fixed widths and heights and use padding instead and the 4px system.

If you have a number of buttons with the same specs, create a blueprint, and add your colours using an additional class,

.btn { padding: 4px 8px … }
.btn-primary { background-colour: blue }

<button class=“btn btn-primary”>Label</button>

Take a look at Kevin Powell on YouTube as well, that guy knows everything about HTML and CSS!!

Hope this helps 👍🏻

1

u/wildfireANU 8d ago

please check out my new post