W. Howard Smith, 78, a retired Prince George's County school inspector who had served several terms as mayor of Brentwood, Md., died Monday at his Brentwood home. He had cancer.

Mr. Smith was born in Hayden, Ala. He moved to Brentwood, Md., in 1921 and was a building contractor there until World War II. He then joined the Navy's construction element, the Seabees, and served in the Pacific theater.

In 1946, he went to work for the Prince George's County Board of education as a construction inspector for new schools. He retired in 1970.

During the 1950s, 1960s and 1970s, Mr. Smith served 16 years as mayor of the city of Brentwood. His last term ended in May. He also had been a Brentwood city councilman.

Mr. Smith was a founder of the Brentwood Garden Club, a past grandmaster of the International Order of Odd Fellows and a 40-year member of the Brentwood United Methodist Church.

He was active in the Republican Party and the YWCA and was a member of the Council of Governments and the Municipal League.

Survivors include his wife, Dorothy E., and a son, William H. Jr., both of Brentwood; two daughters, Elizabeth Murphy of Arlington, and Virginia DuPont of Winter Garden, Fla.; three brothers, Lee, Ernest and Alva Smith, and a sister, Ruby Boykin, all of Albama; 12 grandchildren and three great-grandchildren.

The family suggests that expressions of sympathy be in the form of contributions to the American Cancer Society, or to the Brentwood United Methodist Church.