You can travel with your child to Hanoi. However, you should not expect an extensive entertainment program. The city can be called quite boring for small tourists, despite the fact that the infrastructure is quite convenient for moving and interesting places can be found. Unlike Ho Chi Minh City, Hanoi is not as popular with tourists. It is much quieter and there are not many people here. It is recommended to use a rickshaw or rent a bicycle to move around the city with a young child.
You can come with your child here almost any time of the year. However, keep in mind that it is quite hot and stuffy here in the summer. In addition, there are very heavy downpours. You will also have no problems with placement. Hotels are perfectly adapted for small guests. There are swimming pools and children's rooms in many of them. There is usually a special children's menu in 4-5-star hotels. Vietnamese cuisine is quite spicy. Therefore, it will be better if the child does not eat local dishes. If there is no alternative, then be sure to ask to cook a non-spicy version of the dish.
There are a lot of bakeries and cafes with excellent sweets in the city. You can also find chain eateries like KFC or McDonald's. This is a good alternative to street food. At least, the child will definitely not be hungry and will certainly not have stomach problems. There is no problem with pharmacies in Hanoi. However, it will be better if you have with you those medicines that your child definitely does not have an allergy or other side reactions.