camping and visiting Terracina/ Sperlonga? which is nicer?

My husband and I with two children 3 and 1.5 yrs old are traveling to Rome the end of September for a week and we wanted some beach. Which of these costa town would you recommend? for lively markets, nice restaurants etc? Also any suggestion on camping places to stay where they provide the lodgings? How can I get to this place by train/ bus? Thanks in advance for any replies..