You don’t need to close it, your HTML will be rendered correctly anyway.
+1 you monster
c/foundSatan
I always wondered why HTML even has standards, when you barely have to understand how it works to build a web page that functions as intended…

Magic!
Witch!
Burn them!
King you dropped this: https://github.com/alvan/vim-closetag
Why do you have a class that says “button”?
for styling, probably
There’s nothing stopping you from styling buttons.
Yes, but element selectors based on the tag name alone are considered bad practise. Especially in bigger HTML sites. Even more so if you use a JS library / framework or some broad browser stylesheet underneath, or you use the same stylesheet in several places.
Also, a div or img tag can be a button with its own event listener as well. That may be asking for trouble as well, but I’ve been there (not proud of it).
are considered bad practise.
Considered by whom?
The reasons that made a bunch of people scream very loudly to not do that 20 years ago were never good enough for making generic advice and don’t exist anymore.
Even more so if you use a JS library / framework or some broad browser stylesheet underneath
Learn CSS layers, use CSS layers.
Overall, if you every feel the need to write in your code “a button (behaves like a button)”, it’s very likely you are doing something wrong.
I’m not sold on layers, they do nothing to simplify the current mess that CSS is, because they build on top of what’s already out there. If CSS was built with the concept of layers, then it could probably be better. In reality, we’ll always have specificity rules and IMO adding layers will just add to the complexity.
The specificity rule is not that hard to understand, I’m not sure what’s the point of throwing layers in the mix. There are new CSS features I like and I see simplifying written code, but this is definitely not one of them.
Learn CSS layers, use CSS layers.
What are CSS layers? I’m legitimately curious.
They change the precedence rules so that you can import large frameworks at will and not have them disrupt your rules or each other.
Basically, anything you apply in one layer has less precedence than what is applied on the next layers.
So I’m clear, are you referring to the
@layerCSS at-rule? Or, something else?
Besides what the other comment mentioned, that’s also not how most front-end frameworks work. You often need specific classes with your elements to use the default styles.
Why do you not know HTML?
I suppose they prefer buttons to snaps, zippers, Velcro, or toggle loops
Do people not even Emmet anymore?? Tsk…
I do but I always forget I have it installed. 😅
A few datacenter-adjacent-community’s cubic meters of water later…
The water I would’ve needed to chug from the effort to close it myself. 😌 /s










