Hi Emma,
There are some online universities that offer law degrees but here is a warning that was posted on this site:
What Types of Law Degree Programs are Available Online? "A Cautionary Note about Online Law Degree Programs
Graduates with a Juris Doctor are eligible to practice Law in the U.S. once they are admitted to a state Bar. However, some states do not accept online J.D. degree programs as qualifications for taking the bar exam to become a lawyer, even if the program is accredited. Be sure to research the bar exam and licensing requirements for lawyers in your state if you are looking for an online Law degree program to prepare for a career as a lawyer."
Other than that advice, you just need to research the program you are interested in as you would for any degree you might be interested in. Sandy is correct in saying that you need to make sure your school is accredited and that is true for any degrees you might take leading up to the Juris Doctor degree program as well. If you are in one of those states that will not accept the J.D. online degree to take the bar exam, you can probably still take your bachelor's degree program online and then switch to a bricks and mortar school for the J.D. program. Just check with that school to make sure they will accept your online bachelor's degree before you enroll for it.
Lots of checking needs to be done but it is worth it so that you don't waste your time earning a degree that won't be accepted at the next stage in your education.
