The rules around dog identification have been updated at least twice in the past 30 years, below is a guide to your responsibilities under UK law - sorry I'm not familiar with the rules in other jurisdictions.
The Control of Dogs Order 1992
This piece of legislation mainly focuses around the use of dog tags in the UK, states that all dogs in public MUST have the the name and address of their owner inscribed on their collar, a tag or some other kind of material that can be used for identification. Failure to do so, would be in breach of the Animal Health Act (1981). The maximum fine for this is £5,000, and of course a much increased chance of not getting your dog back, if they can't trace the owner. Some owners choose to include their telephone number, in addition you might want to think about the dog's name, although some people decide not to do this due to the risk of dog theft.
There are loads of nice tags you can order (make sure you always have a spare in case it goes missing on a walk. I particularly like, a cheaper traditional engraved one is , and if you are looking for something more contemporary, might be for you
Microchipping of Dogs Regulation 2015
By the time we got to 2015, microchipping pets was common place and highly advised, although not compulsory. Microchipping is a simple, painless procedure, that requires the installing of a microchip with a unique identification number under the skin of your dog, this identification number is then tied back to a database which contains both you and your dog's contact details and information.
In April of 2016, the Microchipping of Dogs regulations came into force. This states that any dog over 8 weeks of age must be microchipped (there are certain exemptions that require a certificate for some service dogs). In addition, it is a requirement that owners MUST keep the microchip details up to date, this does not require a new microchip, but just for the record in the database to be updated that relates to the microchip. Failure to adhere to the Microchipping of Dogs regulations comes with a potential penalty of £500.