10 ms·
I've heard of a philosophy that instead of a million unique tags that do mostly nothing, modern HTML should use only <div> and <span> instead.
by jiggawatts 2y ago
I've heard of a philosophy that instead of a million unique tags that do mostly nothing, modern HTML should use only <div> and <span> instead.
- lmm 2y agoYep. <div>, <span>, and JavaScript. If you actually want a simpler web stack, that's the way to do it.
- jay_kyburz 2y agoUnfortunately you can't draw a table of number using just divs. It's just too slow and your users will notice. For tables of data, you have to use tables. I'm sure it's true for lots of other elements.
- LegionMammal978 2y agoYou can, you just have to set their "display" properties [0] to "table", "table-row", etc. The whole point of CSS is to divorce styling from the particular HTML tags. [0] https://developer.mozilla.org/en-US/docs/Web/CSS/display https://developer.mozilla.org/en-US/docs/Web/CSS/display
- joquarky 2y agoIf you're going that minimalist, then why even have two tags (div, span) in your toolset when their only difference is display:block vs display:inline
- bdougherty 2y agoNope, that results in significant extra complexity because now you have to implement all the stuff that the browser does for the other tags so that your website works the way people expect. (and you will get it wrong)
- threatofrain 2y agoIMO it's fair to say to colleagues that you're free to use any HTML tags as long as you take responsibility for them by knowing all of their idiosyncrasies.
- MrVandemar 2y agoThen it wouldn't be HTML. It'd be a weird structural language you could really only express whether something is a block or inline.