开发者

Anyone familiar with <center>?

I see this in a website for the first time of life.

Is it supported b开发者_如何转开发y all browsers?


It's deprecated as of HTML 4.01 and not supported in XHTML 1.0. Major browsers will support it though.


It's deprecated. Use CSS to center elements. It is supported in all major browsers though...


<center> is not part of the HTML 4.01 standard, so it's likely that some browsers wouldn't understand it.

The more correct way to center text uses the CSS text-align property.

If a browser doesn't understand a tag, it should ignore that tag. So, even if a browser doesn't understand <center>, it should not ruin the web page.


center tag puts the content in the middle of the line. It's kind of old-fashioned. CSS can do this well.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜