The X Endorsement
X is a federally defined license code, not a separate test on its own. Under 49 CFR 383.153(a)(9), the letter codes for CDL endorsements are T (doubles/triples), P (passenger), N (tank vehicle), H (hazardous materials), S (school bus), and X, defined as "a combination of tank vehicle and hazardous materials endorsements." 49 CFR 383.93(c) lists tank vehicle and hazardous materials as two of the five endorsement categories, each requiring its own knowledge test; X is the code your license carries once you hold both.
What each half requires
The tank vehicle (N) endorsement requires passing a knowledge test on the areas listed at 49 CFR 383.119: cargo surge, baffled versus unbaffled tanks, braking with a partially loaded tank, and related handling topics. The hazardous materials (H) endorsement requires passing a separate knowledge test on the areas listed at 49 CFR 383.121: the hazmat regulations, handling rules, and emergency response procedures. Per 49 CFR 383.93(c)(3) and (c)(4), both are knowledge-test-only; neither requires its own skills test under federal law. Practice both knowledge areas here:Tanker practice test(20 questions) andHazmat practice test(30 questions).
The hazmat half also requires a TSA security threat assessment
Because X includes the hazardous materials endorsement, it also carries that endorsement's extra requirement: 49 CFR 383.141(b) prohibits a state from issuing a hazmat endorsement unless the Transportation Security Administration has determined the applicant does not pose a security threat, or the applicant already holds a valid Transportation Worker Identification Credential (TWIC). TSA's disqualifying standards, listed at 49 CFR 1572.5, cover a disqualifying criminal record, immigration status, a general security-threat determination, and certain mental capacity or commitment findings. This assessment, including fingerprinting and its fee, is run through TSA, not your state DMV, separate from and in addition to your state's own knowledge test.
What this doesn't tell you
Your state DMV sets its own knowledge test's exact question count and format for each endorsement, separately from the TSA process described above. Confirm those details with your state's licensing agency before you apply. If you're only pursuing one of the two, see our dedicatedTanker endorsementorHazmat endorsementpages instead.