I'm not sure how you teach these things, but you may have a misconception about learning that is getting in the way. This seems to be common with newer teachers who don't yet show the scars of many student engagements.
I suspect that you see the relationship between theory and practice fairly clearly. So you explain something to students (possibly at a fairly high, conceptual level) and think that they will be able to make the same connections that you do. But they likely won't, since they don't have your background and experience.
In this particular case, I'd suggest that you give them lots of sample CSS that they can emulate and also (a smaller set) of poor examples and show them the consequences when change is needed. Do this as part of your introduction to creating HTML docs, not as an after-the-action correction. Integrate it into your teaching.
Some of the students will be able to make the leap immediately without this, of course, but many need to learn by example, not by inference. You need to reach all of the students in any teaching situation and all of them learn differently (learning "modalities").
I once wrote a book on a topic important to me, but did so soon after becoming thoroughly familiar with it. It was important to me, in that book, to be able to connect with the beginner's mindset before I forgot how hard it was for me to get started with the topic. Teacher's too often forget how hard their own path was and expect others to have an easier time. New teachers also often don't yet realize that their students aren't like themselves, with different motivations and different ways of thinking.
In general, you need to repeat yourself when teaching, but not in the same words and not with the same tools. Each explanation will, one hopes, reach a large fraction of the students. Each re-teaching (explanation, demonstration, exercise, ...) will likely reach more. Ultimately you want to reach them all, but no one thing will reach more than a fraction.
As a young teacher I once thought that my explanations were so clear and brilliant that no-one could possibly misinterpret them, and that deep ideas (in this case in Statistics) would become immediately clear to all. In actually, I probably got through to about 5% of them. Luckily I learned not to do that anymore.