“Why do we protect our airports and our banks, our government buildings, but not our schools?” Mr. Trump said. “It’s time to make our schools a much harder target for attackers.”

He said declaring schools gun-free zones “puts our students in far more danger.”

Mr. Trump, who was endorsed by the N.R.A. during his campaign and has been an ardent ally, suggested that he was pressuring the gun lobby to accept measures it had deemed objectionable. But the two proposals he mentioned on Friday — improving background checks for gun buyers and ensuring that mentally ill people cannot have access to firearms — are both supported by the group.

Later Friday, Mr. Trump expressed confidence that lawmakers would join forces with him to address the tragedy, particularly on the issue of background checks.

“We’re going to do a lot, but we are going to be very strong on background checks,” Mr. Trump said during a news conference at the White House with Prime Minister Malcolm Turnbull of Australia. “I’ve spoken with many of our people in Congress — our senators, our congressmen and women — and there’s a movement on to get something done.”

But Democrats were stepping up their calls for more restrictive gun laws, far beyond what Mr. Trump suggested.

“It’s time for Republicans in Congress to show just a shred of the courage of American students,” Representative Ted Deutch, the Democrat who represents Parkland, said in the party’s weekly radio address. “It’s time for Speaker Ryan to let the House vote to require background checks on every sale and transfer, to keep guns out of the hands of suspected terrorists, to outlaw bump stocks that enable automatic rates of fire, to require that no one under the age of 21 can buy a gun, and to once again ban assault weapons from our streets.”

Mr. Trump’s comments on arming teachers were part of a highly partisan speech to the conservative gathering — an annual meeting that draws the hard-right activists who form the backbone of his political coalition — in which the president proclaimed that his first 12 months in office “the most successful first year in the history of the presidency.” He referred to Democrats as “crazed,” and said his opponents had “committed a lot of atrocities.” His remarks were met with rapturous applause.