Use this code:

<UL> Start level 1.
<UL> Start level 2.
<UL> Start level 3.
</UL> End level 3.
</UL> End level 2.
</UL> End level 1.

And get this result:

End level 1.