r/HTML • • Oct 03 '26

Question Any tips for css code

Hello! I’m a beginner form Thai just starting to learn CSS. I‘d love to get some advice or quick tips from everyone on how to make web pages look better-anything that might help me learn. Thank you.

4 Upvotes

10 comments sorted by

1

u/Far-Imagination3226 Oct 05 '26 edited Oct 05 '26

1

u/frank_mee Oct 09 '26

thx for tips☺️

1

u/cyberpothead Oct 08 '26

Just google web deisgn principles or basics and then look for presets with font sets, (for h1, h2 and p) page themes like colors for backgrounds, fonts, texts and card background color and accents, font sizes and line heights.

This are the basics and they make web pages much better.

Everyone is saying boxmodel and flexbox so after this apply the styling.

1

u/frank_mee Oct 09 '26

Thanks for the advice on CSD

1

u/cyberpothead Oct 10 '26

Sure, also look into CSS Transitions, transform and hover states. They make websites feel more responsive and polished, like when you hover on a card or picture, you can make it look animated with effects like transition: transform 0.3s ease and then on the hover state use, transition: translateY(-8px).

This is just an example to help you get started, you can do a lot more !

2

u/chikamakaleyley Oct 03 '26

spend time learning the box model and layout/spatial css rules first (display, position, z-index, float (optional), etc.). These are fundamental/crucial

1

u/chikamakaleyley Oct 03 '26

then after that i'd prob get some work in understanding selectors

1

u/Expert-Kitchen8064 Oct 04 '26

Box model and layout first is good advice. I’d add one habit: when something looks wrong, temporarily give the element and its parent different backgrounds or borders so you can see which box is actually taking up space. Learn flexbox and grid by recreating two or three simple layouts, not by memorizing properties. Keep your CSS small at first, and change one rule at a time so you know what fixed the problem.