When I write html and css, does it matter if I do things “my way”, like using an abundance of absolute positioning, or maybe coming up with very unorthodox solutions to certain problems like layout? Since I’m not great right at markup right now, I am kind of just “doing what works.” I’m reading as much as I can but I know I am making mistakes. Is it important that I pay extra special attention to exactly how I’m writing it so I don’t develop bad habits, or should I just be happy that it validates and that is the most important thing?
Share
It has to do more than validate. It has to look good, or at least be functional. The only way to truly validate that is via extensive testing.
It’s worth noting that the standard patterns are there for a reason—because they work. But they’re certainly not gospel. Metaphorically speaking, there’s more than one way to skin a cat. There’s no reason for too much hand-wringing if you find alternative solutions that work for you. The only real concern is that your code might be more difficult to understand and/or maintain in the future, either by you or by someone else.
Above all, though, the best way to learn and improve is to practice. And there’s no better way to practice and discover your mistakes by writing and shipping actual code. If you make a mistake, chalk it up to experience. That’s what we all do.