Even though the H-1B visa is a non-immigrant visa, it is one of the few visa categories recognized as dual intent, meaning an H-1B holder can have legal immigration intent (apply for and obtain the green card) while still a holder of the visa.