Foreign broadcasters, including British, German and Italian TV outlets, also had offices in the buildings.
Lt. Col. Avital Leibovich, an Israeli military spokeswoman, said the strikes targeted Hamas communications equipment on the rooftops. She accused the group of using journalists for cover.
Israeli officials expressed readiness to take the offensive even further with a ground invasion of Gaza. Israel has mobilized thousands of forces and columns of armored vehicles along the border ahead of a possible incursion.
"The Israeli military is prepared to significantly expand the operation," Israeli Prime Minister Benjamin Netanyahu declared at the start of the weekly Cabinet meeting.
The threats come at an important crossroads — with a fateful choice between further escalation or agreeing to a cease-fire with Hamas. Israel and the West consider Hamas, which seized control of Gaza in 2007, to be a terrorist group.
Obama and British Foreign Secretary William Hague cautioned against a potential Israeli ground invasion of Gaza.
Obama blamed Palestinian militants for starting the round of fighting by raining rockets onto Israel and said the U.S. supported Israel's right to protect itself. "Israel has every right to expect that it does not have missiles fired into its territory," Obama said.
Hague also said Hamas "bears principal responsibility" for initiating the violence, but made clear the diplomatic risks of an Israeli escalation. "A ground invasion is much more difficult for the international community to sympathize with or support," he said.
A ground operation would carry grave risks, given the likelihood of heavy casualties on both sides. The Israeli offensive into Gaza four years ago left hundreds of civilians dead, drawing fierce international condemnation and war crimes accusations.
Israel says its intelligence and technology have been perfected since then to minimize civilian casualties. But Gaza's crowded urban landscape makes it all but impossible to avoid them altogether, as Sunday's attack in Gaza City illustrated.
"In this case, you can't avoid collateral damage if they position the rockets in densely populated areas, in mosques, school yards," said Israeli Vice Premier Moshe Yaalon. "We shouldn't be blamed for the outcome."
Avihai Mandelblit, a recently retired chief advocate general in the Israeli military, said that from a legal perspective, "there's no immunity to anyone if you put weapons inside of civilian infrastructure."
But he acknowledged the sight of dead civilians could create a public relations debacle for Israel. "As more civilians will get hurt, the legitimacy clock is going to click faster to end this operation," he said.
Obama said he had been in touch with Netanyahu as well as the leaders of Egypt and Turkey as international attempts to broker a cease-fire continued. Egypt, which often serves as a mediator between Israel and Hamas, has taken a leading role in the efforts.
Israeli TV stations said an Israeli envoy traveled to Cairo on Sunday, and was returning to Israel with details of cease-fire proposals. Channel 2 TV, citing American diplomats, said Netanyahu's personal envoy, Yitzhak Molcho, would be headed to Washington in the coming days.
Hamas officials said their supreme leader, Khaled Meshaal, also held talks with Egyptian President Mohammed Morsi, and that Turkish Foreign Minister Ahmet Davutoglu was to visit Gaza on Tuesday.
Israel and Gaza's militant Hamas rulers remain far apart on any terms for a halt to the bloodshed.
Hamas is linking a truce deal to a complete lifting of the border blockade on Gaza imposed since Islamists seized the territory by force. Hamas also seeks Israeli guarantees to halt targeted killings of its leaders and military commanders. Israeli officials reject such demands.
They say they are not interested in a "time-out," and want firm guarantees that militant rocket fire into Israel will end. Past cease-fires have been short lived.
Federman reported from Jerusalem. Associated Press Writer Lauren E. Bohn in Jerusalem contributed to this report.