PITTSBURGH — Candidates seeking the Democratic nomination for president gathered Saturday for a forum on education and described their plans to tackle major challenges besetting U.S. schools: student debt, segregation and teacher pay. Their questioners included teachers, elementary school students, parents and school janitors.

The forum — sponsored by teachers unions, civil rights groups and MSNBC — marked one of the few times the candidates have spoken about their plans for the nation’s schools beyond sound bites. The candidates addressed a mostly friendly crowd — the audience was there by invitation — and hewed closely to the teacher unions’ own agenda, speaking of reducing testing, boosting school spending and raising teacher salaries. Charter school advocates complained they were locked out of the forum and organized a protest outside the convention center where the event was staged.

The forum was called Education and Equity for All, and the candidates shared how they would tackle inequality in education, which is driven in large measure by how education is paid for in the nation.

Funding for a child’s school is largely dependent on the wealth of the surrounding community. U.S. schools, once envisioned as great equalizers, have become broadly unequal, with black and brown students disproportionately enrolled in schools that don’t have enough resources. Students from wealthier school systems are many times more likely to attend college than children who go to school in districts with fewer resources.

Sen. Bernie Sanders (I-Vt.) said he wants to rethink the use of property taxes to fund schools, although it is unclear how he would revise school funding. Communities rely largely on property taxes to cover the cost of educating their children.

In struggling communities, he said, “the property tax does not provide the kind of funding that the schools need.”

“We’ve got to break our dependence on the property tax . . . and make sure that every school district in this country gets the funding they need,” Sanders said.

Sen. Michael F. Bennet (Colo.) proposed involving the Departments of Housing and Urban Development and Health and Human Services to help build community schools, where children can get health care, counseling and social services in addition to an education.

He lamented that there was no “Department of Children” but said that under his auspices, “the whole federal government is going to act like the department of children.”

Former vice president Joe Biden has faced criticism for his record of opposing federally mandated busing to integrate Delaware’s schools in the 1970s. On Saturday, he did not address the question directly but said he “makes no apologies for my record on civil rights.”

Pete Buttigieg, mayor of South Bend, Ind., proposed requiring school systems to undergo federal review if they want to change enrollment boundaries, a practice that can cause segregation when boundaries are drawn along racial and economic lines.

“We can use a pre-clearance model — that’s not unlike what has been used in areas like protecting voting rights — where when major districts are proposing changes, it needs to go through some evaluation of its impact and what effect that would have on segregation to demonstrate that it wouldn’t worsen things,” Buttigieg said.

Since the campaign started, candidates have differed sharply on the economics of higher education. All the candidates are seeking ways to make college more affordable, but they diverge on student debt relief and on making college tuition-free. Many college graduates are saddled with untenable levels of student debt.

Sen. Elizabeth Warren (Mass.) has gone furthest, proposing to forgive all student loan debt and make college tuition-free. Others have more modest proposals, saying they believe children of the wealthy should not benefit from such plans.

Warren has proposed levying a “wealth tax” that she believes can cover the cost of many of her education proposals.

Warren’s plans include forgiving student loan debt, making more students eligible for grants to attend college, investing more money in historically black colleges and universities, raising salaries for teachers and child care workers, and quadrupling federal funds for schools with a high proportion of students from low-income families.

Warren also wants to underwrite universal prekindergarten, helping to close a preparation gap that puts children whose families could not afford high-quality preschool at a disadvantage as early as kindergarten.

“If we want to transform this country,” Warren said, “let’s start with our babies.”

Biden spoke of his plan to make all community colleges free, a pitch first made by President Barack Obama when Biden was vice president. He said the nation could afford the $6 billion price tag and that it could be covered by closing tax loopholes.

“I think community college should be free,” Biden said. “I promise we can afford it and we’ll get it done.”

The candidates also touched on charter schools, which are publicly funded but privately run, sometimes by for-profit companies that teacher unions have criticized as unscrupulous. States set policies that determine how charter schools are funded and overseen, including how transparent they have to be and how they are held accountable for student performance. The federal government has made grants to help establish charter schools — a funding stream that many Democratic candidates have pledged to eliminate.

Sen. Cory Booker (N.J.), a longtime supporter of charter schools, was stricken with influenza and did not participate in the forum.

Sen. Amy Klobuchar (Minn.), answering a question from a Philadelphia teacher who recounted the story of a child encountering lead in his school and being poisoned, said she would make schools a priority in her trillion-dollar infrastructure plan.

“We have not been investing in these schools,” Klobuchar said. “That’s why when I put out this infrastructure program, a trillion dollars, I put schools up front.”

California businessman Tom Steyer spoke of the central role historically black colleges and universities have played in educating African Americans. He proposed investing $25 billion in the institutions over the next decade.

“I believe that we need institutions that . . . give young people across this country, specifically African Americans, the tools to read, to become teachers, to become engineers, to become doctors, to become judges, to live up to their capability,” Steyer said.