Medieval nobles were divided into two groups - high nobility who were direct vassals of the king such as dukes and counts, and lower nobility including knights. Noblemen began their education as young as 6 by serving as pages in other lord's castles to learn courtly manners. At 14 they became squires and at 21 were knighted. Noblemen spent their time training for war, tournaments, and hunting. Noblewomen received practical educations in etiquette and skills like dancing and archery before marrying as young as 12. Castles served as defensive fortresses where nobles lived, surrounded by thick walls, towers, and moats. Inside the walls was the keep with floors for living and great halls