Home > Web Front-end > Front-end Q&A > How to use html center tag

How to use html center tag

藏色散人
Release: 2019-05-26 09:26:39
Original
5149 people have browsed it

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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template