President Obama said Saturday that the country is "a better place today" than when he graduated from college more than 30 years ago, citing his historic election as "one indicator of how attitudes have changed."
But gaps persist, he told Howard University's Class of 2016, citing racism and inequality.
In a commencement speech at one of the nation's leading historically black schools, Obama said there were no black CEOs of Fortune 500 companies and few black judges when Columbia University awarded him a bachelor's degree in 1983.
"A lot of folks didn't even think blacks had the tools to be a quarterback," Obama said. "When I was a graduate, the main black hero on TV was Mr. T. Rap and hip-hop were counter-culture. Now ("Scandal" and "Grey's Anatomy" producer) Shonda Rhimes owns Thursday night and Beyonce runs the world."
Today, he said, "we're producers, studio executives. We're no longer small-business owners, we're CEOs. We're mayors, representatives" -- and someone in the crowd shouted out, "President."
"I'm not saying gaps do not persist. Obviously, they do," Obama said. "Racism persists, inequality persists."
He called on the university's 2,300 graduates to step up and take on the work of closing those gaps.
"America needs you to gladly, happily take up that work ... so enjoy the party, because you're going to be busy," Obama said.
He cited income inequality, an issue in the presidential campaign to choose his successor in November, as well as disparities in unemployment, pay and criminal justice. He also listed disease and conflict worldwide, along with terrorism and climate change as other issues needing attention.
"So make no mistake Class of 2016. You've got plenty of work to do," said Obama, who was awarded an honorary doctor of science degree. "But as complicated and intractable as these challenges may see, the truth is your generation is better position than any before you to meet those challenges."
"America is a better place today than it was when I graduated from college," Obama said, adding "by almost every measure." He said the country "also happens to be better off than when I took office, but that's a longer story."
The line drew cheers and applause. "That's a different discussion for another speech," Obama said.
Obama told the graduates to be confident and embrace being African-American and all that it entails, including "our particular awareness of injustice and unfairness and struggle. That means we cannot sleepwalk through life. We cannot be ignorant of history. We cannot meet the world with a sense of entitlement."
He urged them to vote and not to fear opposing voices. Many in the audience of about 15,000 chanted "four more years" as Obama received the honorary degree. He cited low voter turnout in general and among younger voters in particular for control of Congress switching from Democratic to Republican during his presidency.
"You don't think that made a difference in terms of the Congress I had to deal with," Obama said. "And then people wonder why Obama didn't get this done or that done. "Just vote. It's math."
Obama, 54, opened by telling the graduates that most of them were just starting high school when he was first elected in 2008.
"I used to joke about being old. Now I realize I'm old. It's not a joke anymore," he said.
The address was the first of three commencement speeches Obama has scheduled this spring, his final ones as president.
Obama is set to speak May 15 at Rutgers University in New Brunswick, New Jersey, and June 2 at the U.S. Air Force Academy in Colorado Springs, Colorado.