Seeking Advice on Good Areas for Lodging in Lisbon and Porto

We will be traveling to Lisbon and Porto beginning May 9 for 11 days. We are flying into Lisbon and departing from Porto. Looking at staying at an Airbnb place and seeking advice on safe areas to stay while in Lisbon and in Porto . My young granddaughter and I need to be in a safe area preferably close to transportation. We would like to take public transportation via tram and trains to the major tourist areas and a few days on the coast. I was considering going to Algarve but reading previous posts it may be a better use of our time to visit the "Silver Coast". This is the first time I heard/read about the Silver Coast so excited to learn more about it.
Thank you

First of all, Portugal has been consistently rated in the top five safest countries in the world! So, finding a safe area is not really a concern. Staying close to public transportation is likely your biggest priority, depending on how young your granddaughter is.
Baixa or Chiado in Lisbon would be my suggestions. Baixa has the advantage of being one of the few flat areas in Lisbon so you aren’t climbing a hill every time you walk out the door. Chiado would have more restaurants but is hilly. The Baixa-Chiado metro station connects the two areas. Tram 28 runs through both, but don’t plan it for general transportation due to the crowds.

In Porto, the Rebeira area or close to it, would be my preference.

The Silver Coast area is quite nice with some lovely beaches. São Martinho do Porto has a great horseshoe beach with very calm waters, ideal for children.. But, the water will be very cold in May. And, public transport In that area will be scarce. I drove the Silver Coast area on my scouting trip before moving and the driving is very easy, if you want to change your mind about renting a car for that portion of your trip.

There are also beaches very close to Lisbon on the Cascais train line. You could do these beaches without a car.

Thanks to the wonderful and most helpful information/ suggestions. I have been researching them and excited to find a place. I stumbled upon Alcochete, Setúbal area. Can anyone tell me about this area?
Again many thanks to those who have responded.

The biggest issue I would have staying in the Setubal area is much less frequent transport to Lisbon.

Alcochete may be a bit smaller than I would like but, admittedly, I had never heard of it until I read your post. The good news is that it is likely not over run by tourists, which might be attractive to you.

I have been to Setubal to go dolphin watching and it’s a nice area. The seafood is very good, but that can be said about many coastal towns. In a brief search, I was unable to find information on public transport once you get to the Setubal area. If you plan to stay there without a car, that might be an issue.