Barack Obama is widely recognized as the first Black president of the United States. He was elected in 2008 and took office in 2009.
As for 1888, that's a bit of a mix-up. Obama obviously wasn't around then, so there was no Black president in that year. The premise of the question doesn't quite line up with history.