是 <centre> 还是 <center>?

Is it <centre> or <center>?

用于居中元素的标签是 <center> 还是 <centre>

我知道 <centre><center> 标签已不再使用,但哪个是正确的?

我很困惑。 Visual studio 代码表明 <center> 是错误的,但只有 <centre> 适用于 Microsoft Edge。

编辑:Microsoft Edge 现在支持 <center><centre> 无法与 Microsoft Edge

一起使用

那么是哪一个呢?

<center> but this tag has been deprecated in favor of CSS property text-align

Visual studio code says that is wrong

不是说错了,而是deprecated/obsolete

Edit: Microsoft Edge now works with <center>. It was <centre> that didn't work with Microsoft edge

在HTML5中你可以创建自定义标签(therego centre适用于所有现代浏览器),但在旧浏览器中你必须将它们设置为display:block否则它不会工作。

我记得最好的例子是 Eric Meyers

reset.css
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
  display: block;
}