2 ms·
Html used to have style embedded into it (blink, table, align, font etc). The idea of separating the style into a css file was born in a time when server side
by strictfp 12y ago
Html used to have style embedded into it (blink, table, align, font etc).
The idea of separating the style into a css file was born in a time when server side scripts were generating the html (hence the programmers), and the frontenders didn't want to ask for code changes nor code themselves. So they figured that if you could separate the content from the style, they could make changes without talking to programmers.
This didn't always go so well. As you all know, css quite often require wrapping divs and other content tweaks to do its wonders.
Eventually the frontenders gave up and took over responsibility for all the markup, only requiring a CRUD backend.
So now we have separation for no apparent reason. Some argue that it's a great benefit to be able to swap styles by swapping csses, but how often is this really used? And having parallell structures in your code is a known to be costly developer-wise.
If I look at how Bootstrap tries to close that gap by fixing the style of different elements and factor in the fact that all frontenders know how to code and own all the markup I think to myself: why not go back to the old system?
Html5 has already started this trend by giving explicit names to tags instead of calling them "div", "span" or "object". Btw, why have div and span in the contents, the only difference between them is style, right?
I think it's time to consider html a rendering artifact and let style be embedded.