Herbert A. Boyd Sr., 62, a teacher and principal in the D.C. public school system for more than 30 years before his retirement in 1978 and a member of the D.C. Human Rights Commission, died Friday at D.C. General Hospital after a heart attack. He lived in Washington.

Mr. Boyd began his career in the school system in 1946 as a fifth grade teacher at Lovejoy Elementary. During the next 20 years, he taught at Spingarn and Dunbar high schools and at Logan Elementary. He became principal of Logan in 1966.

During his four years as Logan's principal, he helped pioneer the concept of the "community school." The idea of the "community school" was to provide programs for the very young and for those who had left school and for the elderly in addition to educating the regular students.

Logan operated evening classes for adults who came to the school to learn typing, to take courses to become nursing assistants, and to study for high school equivalency tests. It also supervised "cottage nursery schools" for 2- and 3-year-olds who were taught by specially trained neighborhood mothers in their homes.

From September 1970 to December 1978, when he retired, Mr. Boyd was the principal of Brent Elementary.

In an interview with The Washington Post in 1979, Mr. Boyd said he always felt that his "main task was to make it possible for teachers to teach and children to learn . . . I know it sounds corny, but where there is love in a school, learning is bound to take place. Without it, you can usually forget about everything else."

For the past year and a half, Mr. Boyd had been a member of the D.C. Human Rights Commission.

Mr. Boyd was a life member of the National Education Association and the National Congress of Parents and Teachers. He was a member of the Capitol Hill Kiwanis Club and the Elementary School Principals Association. Active in community organizations, he was a consultant to the Law Enforcement Assistance Administration, the Boy Scouts, and the Capitol Hill Arts Workshop.

Mr. Boyd was born in South Carolina and came to Washington in 1929. He was a 1937 graduate of Dunbar High School, where he was captain of the football, basketball, and baseball teams. A graduate of the old Miner Teachers College, he earned a master's degree in education at New York University. He served with the Army in the China-Burma-India Theater during World War II.

Survivors include his wife, Frances, of Washington; a daughter, Saundra B. Owens of Suitland; a son, Herbert Jr., of Washington; a brother, Charles A., of Washington, and two grandchildren.

The family suggests that expressions of sympathy be in the form of contributions to the Herbert A. Boyd Scholarship Fund for Children, c/o The Capitol Hill Arts Workshop Inc., 545 7th St. SE, Washington, D.C., 20003.