Home >Web Front-end >Front-end Q&A >How to use html center tag
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!
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:
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!