What is the difference between w:tab and w:ind tags in oxml?

I'm reading docx file in python and getting the oxml corresponding to each line using the docx library. There are two tags in oxml which I find very similar, the w:tab tag and w:ind tag, I want to know from where does tab imply spacing and from where does ind imply spacing. And what happens when both are specified.


I do not know from where they imply spacing but would guess that it is from the (left) margin.

Tab settings are spots where text will restart after a tab key is pressed, like the tab settings on a typewriter.

Indent settings are paragraph margins. You can also have:

  • a hanging indent which only applies to the first line and is further to the left
  • a first-line indent which only applies to the first line and is further to the right
  • a regular indent which sets a new left or right "margin" for a paragraph.

The difference between margins and indents and kinds of indents is dealt with more depth in my page on basic formatting in Word.