Why are dog tags called dog tags?

If you've ever gone through basic training in the army, you get this right away. The soldiers ID Tags resemble actual dog tags and you get treated worse than a dog until you've earned the right to be called a soldier, paratrooper, marine, sailor, or airman.