Home  >  Article  >  Web Front-end  >  How to use html center tag

How to use html center tag

藏色散人
藏色散人Original
2019-05-26 09:26:395081browse

html The center tag is used to horizontally center the text it contains. Currently, all major browsers support the center tag. It is recommended to use CSS styles to center the text!

How to use html center tag

What is the label for center? How to use html center tag?

Function:

Center the included text horizontally. Currently, all major browsers support the center tag.

Instructions:

Please use CSS styles to center the text!

Note:

In HTML 4.01, the center element is deprecated. In XHTML 1.0 Strict DTD, the center element is not supported.

html center tag usage example

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <center>这是需要居中的内容</center>
</body>
</html>

Effect:

How to use html center tag

The above is the detailed content of How to use html center tag. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn