How does kanji stroke order work?

This page gives a few generalities about how to write kanji in the
correct stroke order. The stroke order given here is specifically the
Japanese one. Chinese orderings may differ in some details.

Arne