Complex sentence: Margaret was first married to Henry, the son of Frederick II, Holy Roman Emperor, who was elected King of Romans and then rebelled against his father.
Split into simpler sentences: Margaret was first married to Henry, the son of Frederick II, Holy Roman Emperor. Henry was elected King of the Romans, but later rebelled against his father.