My instructor who's also an independent tester for the state said specifically you *can't* take the hazmat test until after you pass the road test and get your CDL-A. The other endorsements like tanker and tandems you get w/ just your permit but apparently hazmat has to wait until you're fully licensed. At least in the state of TX apparently. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.