Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

how to change alingment of text in html

+11 votes
asked Mar 28, 2023 by King Rao (220 points)

4 Answers

0 votes
answered Apr 2, 2023 by Arav Gupta (140 points)
hello

you can use align atribute in html for example:

<html>

""""""""""

<body text align="right"> """""""</body>
0 votes
answered Apr 4, 2023 by Naveen Shankar D (140 points)
<allign = center/right/left>
0 votes
answered Apr 6, 2023 by Arstriker (140 points)

To change the alignment of text in HTML, you can use the CSS text-align property. Here are the different values for text-align property that you can use to align your text:

  • text-align: left - aligns text to the left of the container
  • text-align: center - centers the text horizontally within the container
  • text-align: right - aligns text to the right of the container
  • text-align: justify - justifies the text within the container, stretching the words so that they fill the entire width of the container.
0 votes
answered Apr 9, 2023 by arshiya mulla (140 points)
<p text-alignment="center">
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...