Yes. I didnt wear a hat as a child, but my father, if we past a woman on one of our long walks in the country, would always nod and touch his hat.
When I’m wearing a hat or baseball cap I still follow thise rules.