Why should we use CSS rather than HTML to create borders for our tables?

I dont think we can,div are basiacaly for code text grouping if am not mistaken😊

<div></div> is one of a number of sectioning elements. Were it the parent element of the element we wish to border, the border property could be applied to it and on the screen nobody would be the wiser.

If we use CSS to maintain the overall size of the object, the border will take up some of the space of the child element. In a way, while this adds structure (more code) but it also frees up the child element to have its own background and sizing expectations. If its width is 100%, then it will not demand any more space than the parent can allow. The parent can be fixed size, relative size, of even relative to the body size. It won’t matter to the child.

In a way this is a better way to separate concerns that only get in the way of the actual styling we want on the child element. Any properties that can be handed up to the parent will only make the selector rule(s) at the child level simpler and easier to maintain.

1 Like

how to open dashboard of any wifi through guest account?

Making it modular never makes it complicated, it’s just a matter of getting used of that

Yeah, it still seems a little weird, but I think those of us learning can expect that some things won’t make sense until we’ve learned a little more about computer science and the purpose of the code that we’re learning. I honestly did find it somewhat helpful to do an internet search for “Separation of Concerns” and read a bit about the reasoning behind it.

thanks for your illustration @bjthomas1 you save my life :slightly_smiling_face: