https://html.spec.whatwg.org/dev/obsolete.html#non-conformin...
Ok, maybe this will make my point clearer:
<center style="background-color: green">
<div align=right style="width: 10ch">
hello
</div>
</center>
To replicate this in standard CSS: <div style="background-color: red">
<div style="text-align: center; margin: 0 auto 0; width: fit-content">
<div style="text-align: right; width: 10ch">
hello
</div>
</div>
</div>
Or you can switch out of flow layout: <div style="background-color: red; display: grid; place-content: center">
<div style="text-align: right; width: 10ch">
hello
</div>
</div>
Ok, one semantic div less. But why can't I do this? <div style="block-align: center /* would act like text-align: -moz-center */">
<div style="width: 10ch; block-align: right /* would act like text-align: -moz-right */">
hello
</div>
</div>
If my browser understands the first variation, then getting it to understand
the last one is in all likelihood not much effort; it's just substituting
properties.The only reason it doesn't, is that the property does not exist in the standard. So you have to use non-semantic centers instead of semantic divs, but that's frowned upon, so you have to use grid layout even though you aren't making a grid, just centered flow.
I just wish it were standardized, considering it's already implemented in all browsers (in the forms text-align: -moz/-webkit-center).
<center> was marked obsolete because it's not semantic HTML, and centering stuff is the task of CSS, not HTML. It was not marked obsolete because a block-level text-align-like property would be useless.
My comment was lamenting the fact that standard CSS does not provide a compatible alternative, despite widespread implementation of the feature. Saying <center> is obsolete does not resolve this issue.