1996 blazer - what is the valve-looking thing on the top front of the gas tank and where can you get a replacement?

that is called a fuel tank vent valve there are two kind's one you can remove from the tank

this part is sold at most auto parts stores the 2nd one is permanent and can not be remove you will need to buy a new tank try e-bay got one for under $100.00