The phrase unwritten law refers to an accepted rule in spite of its informality. Example: It's an unwritten law to take your hat off during the national anthem.