Handrails and guards are different
A handrail is the rail you hold going up and down a stair or ramp. A guard (what most people call a railing) stops a fall off a deck, landing or the open side of a stair. A handrail can be the top of a guard where the heights match. Both are measured straight up: a handrail from the line joining the stair nosings, a guard from the deck or floor.