How to align text in html

青灯夜游
Release: 2021-12-10 17:25:31
Original
27020 people have browsed it

In HTML, you can use the text-align attribute to align text. Set the "text-align:center" style to the text to align it horizontally in the center, and set "text-align:right" to align it horizontally to the right. Set "text-align:justify" to align both ends.

How to align text in html

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

In HTML, you can use the text-align attribute to align text.

  • text-align:centerSpecify element text to be aligned horizontally in the center.

How to align text in html

  • text-align:rightSpecifies the horizontal right alignment of element text.

How to align text in html

  • text-align:justifySpecifies that the text of the element is aligned at both ends.

How to align text in html

Recommended tutorial: "html video tutorial"

The above is the detailed content of How to align text in html. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!