InDesign right-indent: How to right-align text or page numbers in a left-aligned paragraph (eg. table of contents)

Here’s a tip if you’re working in InDesign on a table-of-contents type of layout and you want to include in a text box both: text that is placed on the left side and a page number aligned on the right side.

The tip is, instead of adding space bars, or tabs and modifying them with the tab menu, or even trying to divide the text into different alignment, or making 2 text boxes, an easy way is to:

Insert the text in the text box that has to be on the left side, then go to: Type>insert special character>other>right indent tab (shortcut: shift + tab) and insert the page number or whatever text you want to be aligned to the right side!