Does light have weight? And assuming so, does that mean black holes affect it via gravity?

On the opposite side, how is light absorbed into a black hole since it has no mass?