How can a child have a health code without an ID card?

Legal analysis: children can get the health code without an ID card, because as long as there is a household registration book, there is a child's ID card on the household registration book, which can be filled in directly according to the household registration book.

Legal basis: Law of People's Republic of China (PRC) on the Prevention and Control of Infectious Diseases Article 2 The state implements the policy of putting prevention first, combining prevention with control, classified management, relying on science and relying on the masses in the prevention and control of infectious diseases.