Wash canning jars and lids with hot, soapy water, and rinse them well.
In a large mixing bowl, combine the shredded cabbage, grated carrots, and chopped onion. Mix well and set aside.
In a large pot, combine the white vinegar, sugar, celery seed, mustard seed, salt, and turmeric (if using). Bring the mixture to a boil over medium-high heat, stirring until the sugar is completely dissolved.
Carefully pack the prepared coleslaw mixture into the sterilized canning jars, leaving about 1/2-inch of headspace at the top of each jar.
Use a clean knife or a canning tool to remove any air bubbles by gently running it around the inside edges of the jar.
Wipe the rims of the jars clean with a damp cloth to ensure a proper seal.
Place sterilized lids on the jars and screw on the metal bands until they are fingertip-tight. Don't over-tighten.
Place the filled and sealed jars in a boiling water bath. Ensure that the jars are completely submerged in water. Process the jars for about 10-15 minutes, adjusting the time based on your altitude and following proper canning guidelines for your location.
After processing, carefully remove the jars from the water bath and allow them to cool on a clean towel or cooling rack. As the jars cool, you should hear the lids "pop," indicating a successful seal. Check the seals after the jars have cooled for a few hours by pressing down on the center of each lid. If it doesn't pop back, the jar is sealed. If a jar doesn't seal properly, refrigerate it and consume the coleslaw within a few weeks.
Store the sealed jars in a cool, dark, and dry place. Properly canned coleslaw can be stored for up to a year.