Portsmouth is great! But can also be bloody awful if you get the wrong bits (so don't bother with Commercial Road). It's quite hipster in Southsea with quirky shops and so forth. Basically, you want Southsea and Old Portsmouth only - avoid the other areas in general (they have pockets of greatness and are fine to live in but less lovely for visitors).
The historic dockyard is the absolute must, museum-wise, but there is also Cumberland House natural history museum near Canoe Lake (which has pedaloes and a nice park opposite the beach with tennis courts). There's a lovely fish and chip restaurant (quite dear) at the end of the pier, or lots of places to get chips and sit on the beach. Plenty of places selling hot doughnuts and candy floss and so on, plus there's a grim but excellent slot machine place on the pier with push-tuppence machines and sticky carpets, if you like that kind of thing once in a while (which I do).
The Southsea Beach Cafe (towards Eastney) is lovely, as is the Canteen, down at the hot walls end (Old Portsmouth). The promenade from end to end is about 4 miles so if the children are up for a hike you could do the whole thing in a day and it's wide for scooters etc.
If you get a sunny day, one thing that's lovely and not expensive is to get the Gosport ferry across and back. You could go to Explosion in Gosport to make it worthwhile but the best bit is coming back on the ferry in the afternoon when the sun is going golden on the Spice Island point.
The hovercraft to the IOW is interesting if you've never been on a hovercraft and is fun to watch take off. There's a horrible but v child-friendly cafe nearby called Mozzarella Joe's. The fair (seedy, properly English seasidey) is right by it.
Southsea Castle, where Henry VIII watched the Mary Rose sink, is interesting to visit or just to run around outside and very daring kids can ride scooters down Castle Hill and risk their teeth for adrenaline thrills.
There's definitely plenty to do for a few days and if you get the weather, it's great. A day trip to the IOW is well worth it too, if a bit dear. Hover is about £23 return per adult; the fast cat is about the same price but a bit slower. Not sure about car ferry prices. Parking is an absolute beast so practise your parallel parking for tiny spaces and come prepared to be mildly annoyed a lot of the time if driving around.