Babies and toddlers learn by exploring. Shouting or smacking will not teach them about safety and when they are too young to understand the dangers it is up to us to make sure they are safe. A typical household is full of possible dangers. There are lots of things we can do to help prevent accidents in the home. Equally we need to make sure children are safely contained within the house with door locks and windows being closed and having safety catches. There can be dangers from outside, so make sure your child understands that if they are able to open the door, they do not open it to anyone they do not know or trust.
Check toys with small pieces are not left out for a toddler to chew and choke on. Make sure toys have safety marks.
Balconies and outdoor spaces and garden ponds can be danger areas, so make sure your child is never left alone. Make sure there is nothing they can climb onto whilst on a balcony and ensure there are no gaps through which they could squeeze.
Even the most good-natured pet can lash out or bite. Animals and young children should not be left alone together. Never trust an older toddler to be left alone with a baby even for a few minutes.