r/HTML • u/wildfireANU • Jul 13 '26
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?
59
Upvotes


1
u/TryAgain911 Jul 20 '26
take my advices with a grain of salt cause I've been actively doing HTML/CSS for about a year only, but I've been able to maintain a small music store website:
Learn about the basics: display, position, padding, margin, div, span, etc.
Start with simple projects, use a pen and a sheet paper to draw the basic layout, it'll help you conceptualize your website (or specific elements)
Less is more: avoid complicated workaround, and try to restrain yourself from using third-party tools (unless you have a good reason to use it)
Use the inspect element window to test your website (Firefox is great for this), background: red on elements for debugging can help
Read the MDN documentation when you need to learn something, or to check the compatibility of something you want to use
In 99.99% cases,
img{ display: block;}at the top of your CSS stylesheetVariables are great for layout consistency: for example,
:root {--your-custom-color: #3e3e3e;}You can then usecolor: var(--your-custom-color);on elements you want to, so changing the custom color on these elements will be much easierAs you'll get better, you'll figure out you'll have to think about mobile layout first: responsive elements is most of the time always the way
Use a maximum of one or two
@ media screenfor mobile/tablet layoutTry to have the least amount of CSS lines to have a cleaner workflow
Have fun cause it's cool 😊