David L. Krooth, 71, a lawyer who specialized in cooperative housing and a former federal housing official, died of cancer Thursday at his home in Washington.

Mr. Krooth, who was born in Chicago and who earned a law degree at the University of Chicago, began his Washington career in 1933. In that year he was appointed counsel to the Federal Emergency Administration of Public Works.

He later served as assistant general counsel of the old U.S. Housing Authority and general counsel of the Federal Public Housing Authority and the Defense Homes Corporation. In 1946, President Truman appointed him acting commissioner of the Public Housing Authority.

He resigned at the end of that year to set up a private law practice in Washington. At the time of his death, he was a partner in the firm of Krooth and Altman.

He was president and director of the National Housing Conference, a public interest group concerned with housing for low-and moderate-income groups. He was general counsel for the Foundation for Cooperative Housing and chairman of the American Bar Association's committee on housing and urban renewal.

Mr. Krooth also undertook several housing projects for the Agency for International Development in Central and South America.

His survivors include his wife, Molly, of the home; a son, John D., of Potomac, and a daughter, Dorothy Haas, of Brandywine, Md.; a brother, Arthur, of Chicago; a sister, Sylvia LaBarge, of Brookville, Ohio, and five grandchildren.

The family suggests that expressions of sympathy be in the form of contributions to a charity of one's choice.