How to Make the Text to the Right With HTML Tags

Basic websites are written using hypertext markup language (HTML). The coding in HTML determines how text and images are displayed on the Web page. HTML syntax can tell the page to display such elements as color, size, fonts and position. Simply changing one element of the Web page can cause it to display text that is aligned to the right rather than the left side of the page.

Things You'll Need

  • Text editor or Web design application
  • Web browser
Show More

Instructions

    • 1

      Open your Web page in the editor of your choice. This can be a text editor or a Web design program.

    • 2

      Position the cursor in the location where you want right-aligned text.

    • 3

      Type the following code: <p style="text-align:right;">. The "p" stands for paragraph. This means you are starting a new paragraph style with text aligned to the right. Note: If the text you want to realign is already enclosed by the "p" tags, just change the code so that it appears as shown.

    • 4

      Enter the text directly after the bracket. All of the text entered within the given brackets will display on the right. Skip this step if you are moving text that already exists.

    • 5

      Close the paragraph with the following style code: </p>. Position the cursor in the location where you want the text to align to the right. Type "</p>" to close the paragraph code. Make sure there is only one "</p>" for every paragraph code.

    • 6

      Check to make sure you entered the code correctly. It should look something like this: <p style="text-align:right;">This is my right-aligned text</p>.

    • 7

      Save the Web page as an HTML file. Then, open the file in a Web browser to make sure the copy displays correctly. The words "This is my right-aligned text" should display on the right side of the Web page.

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured