Hacker News new | ask | show | jobs
by philipwalton 4565 days ago
Post author here. I agree 100% that HTML and CSS are not programming languages. However, any application that you build on the front-end is going to require your JavaScript code to interact with the HTML and CSS, so a solid understanding of how all the pieces fit together is crucial.

I can't tell you how many times I've seen back-end engineers hack together a 100+ line JavaScript solution to a problem when one line of CSS would have fixed it.

If you don't know CSS, HTML and DOM very well, then you're probably going to be over-engineering your front-end apps.

2 comments

Any book recommendation? I can say I know JS as a language sufficiently well (I can write basically anything on Node), but I almost completely lack a systematic understanding how the HTML+CSS and DOM work together (layout engine, rendering, etc). I have some basic knowledge here and there, but reading "We need to make outside div relative to be able to use absolute on the inner one" leaves me staring out of the window.
The problem is, it's even more subtle than that. Sometimes, the right way to do something is by setting classes (or even, god forbid, inline styles) on the DOM using JavaScript, and sometimes it's better to use CSS. Sometimes it's debatable which way is better.

It's definitely a tricky area of development, that's for sure; pitfalls and subtleties abound.