A dress code is the set of clothing rules a venue or event expects guests to follow, from the relaxed smart casual to the solemn white tie.
Some codes read like legal documents, and the Royal Enclosure at Royal Ascot is the gold standard. Recent editions require women to wear a hat, or a headpiece with a solid base of at least ten centimetres in diameter, skirts that reach just above the knee or longer and straps at least an inch wide, while strapless and off-the-shoulder styles are out. Men must wear morning dress with a black or grey top hat, plain and without decorative ribbon, black shoes and socks that cover the ankle.
Nightclubs tend to be vaguer, with the ever-mysterious no sportswear. The safest strategy anywhere is to check the rules before leaving home, since the door is rarely the place to win an argument about trainers.