It's simple enough to avoid infection with hepatitis virus. You can get vaccinated against types A and B. Types B, C and D can be prevented by avoiding contact with the blood or body fluids of others. Condom use is the only way to prevent sexual transmission of hepatitis viruses. Injecting illegal drugs with shared needles has very high risk for exposure to hepatitis and HIV.