Hundreds of people rallied outside a courthouse in the US state of Florida to demand stricter gun control laws in the aftermath of one of the deadliest school shootings in the country's modern history.

Several student survivors of this week's deadly attack in the town of Parkland were among those attending Saturday's rally in Fort Lauderdale, only 40km from the school that came under attack.

Holding signs that read "Never Again", demonstrators called on the US government to take action to prevent future violence.

"To every politician taking donations from the NRA, shame on you!" said student Emma Gonzalez, who criticised Donald Trump for the multi-million dollar support the US president has received from the powerful gun lobby group, the National Rifle Association.

The crowd then chanted, in turn: "Shame on You! Shame on You!"

At least 17 people were killed when a gunman entered the Marjory Stoneman Douglas High School on Wednesday and opened fire on students and teachers with an AR-15 automatic rifle.

A 19-year-old former student, Nikolas Cruz, was arrested and charged with 17 counts of premeditated murder in relation to the attack.

300 school shootings

For his part, Trump made two brief stops - at a hospital and a sheriff's office - in Florida on Saturday, where he praised the doctors, police officers and others who responded in the immediate aftermath of the shooting, The Washington Post reported.

"Incredible job and everybody is talking about it," Trump reportedly said, after a meeting at the local sheriff's office.

Across the street, a single protester stood holding a sign that read: "Protect our Childrens [sic]!", the newspaper said.

The 18th school shooting so far this year, the attack has prompted another debate over gun control in the US.

Elected officials have been strongly criticised for refusing to enact legislation that would restrict the ability of Americans to purchase weapons.

About 300 school shootings have taken place across the US since 2013, gun control advocacy group Newtown estimates.

David Hogg, another student survivor of the Florida shooting, added his voice to those criticising the "elected officials out there today who refuse to take action and continue to take money from these special interest groups".

"Stop," Hogg urged them, at the protest in Fort Lauderdale. "Stop it now!"