Congenital heart disease is caused when something disrupts the normal development of the heart.
It's thought that most cases occur when something affects the heart's development during the first 6 weeks of pregnancy. This is when the heart is developing from a simple tube-like structure into a shape more like a fully formed heart.
While some things are known to increase the risk of congenital heart disease, no obvious cause is identified in most cases.
There are a number of things that can increase the chances of a child having congenital heart disease.
See types of congenital heart disease for more information on the different heart defects mentioned on this page.
Several genetic health conditions that a baby inherits from 1 or both parents can cause congenital heart disease. It's also recognised that certain types of congenital heart disease run in families.
Down's syndrome is the most widely-known genetic condition that can cause congenital heart disease. Children with Down's syndrome are born with a range of disabilities as the result of a genetic abnormality.
About half of all children with Down's syndrome have congenital heart disease. In many cases, this is a type of septal defect.
Other genetic conditions associated with congenital heart disease include:
Women with diabetes have a higher risk of giving birth to a baby with congenital heart disease than women who don't have diabetes.
This increased risk only applies to type 1 diabetes and type 2 diabetes. It doesn't apply to gestational diabetes, which can develop during pregnancy and usually disappears once the baby is born.
The increased risk is thought to be caused by high levels of the hormone insulin in the blood, which may interfere with the normal development of a foetus (the early stages of the baby developing in the womb).
If a pregnant woman drinks too much alcohol during pregnancy, it can have a poisonous effect on the tissue of the foetus. This is known as foetal alcohol spectrum disorder.
Children with foetal alcohol spectrum disorder can have congenital heart disease, such as atrial or ventricular septal defects.
The Department of Health and Social Care recommends that pregnant women shouldn't drink alcohol.
Read more about drinking alcohol while pregnant.
Rubella (german measles) is an infectious condition caused by a virus. It isn't usually a serious infection for adults or children, but it can severely affect an unborn baby if a mother develops a rubella infection during the first 8 to 10 weeks of pregnancy.
A rubella infection can cause multiple birth defects, including congenital heart disease. All women of childbearing age should be vaccinated against rubella. The vaccine is given as part of the NHS vaccination schedule.
Contact your GP for advice if you're not sure whether you've been vaccinated against rubella.
Women who get flu during the first trimester (3 months) of pregnancy are at greater risk of having a baby with congenital heart disease than the general population. The reasons for this are unclear.
The flu vaccine is recommended for all pregnant women.
There are several medicines linked to an increased risk of a baby being born with congenital heart disease. These include:
Paracetamol is a safer alternative to ibuprofen during pregnancy, although ideally you should avoid taking any medicines while you're pregnant, particularly during the first 3 months of pregnancy.
Speak to your GP or pharmacist if you're unsure about which medicines should be avoided during pregnancy.
Phenylketonuria (PKU) is a rare genetic condition present from birth. In PKU, the body can't break down a chemical called phenylalanine, which builds up in the blood and brain. This can cause learning and behavioural difficulties.
PKU can usually be effectively treated with a low-protein diet and dietary supplements. Pregnant mothers with PKU who don't do this are more likely to give birth to a baby with congenital heart disease than the general population.
Women who are exposed to some organic solvents may be more likely to give birth to a baby with congenital heart disease than the general population.
Organic solvents are chemicals found in a wide range of products and substances, such as paint, nail polish and glue.