# [Python 2], <s>55</s> <s>54</s> 51 bytes
<sup>-3 bytes thanks to Felipe Nardi Batista</sup>
<!-- language-all: lang-python -->

    i=1
    for c in input():i-=c<'<';print' '*i+c;i+=c>'<'

[Try it online!][TIO-j7kg4vow]

[Python 2]: https://docs.python.org/2/
[TIO-j7kg4vow]: https://tio.run/##K6gsycjPM/r/P9PWkCstv0ghWSEzD4gKSks0NK0ydW2TbdRt1K0LijLzStQV1LUytZOtM7Vtk@2Aov//q@vHAAGEUP8PAA "Python 2 – Try It Online"