Virginia students scored above the national average on standardized tests for the third consecutive year, with a record 96.3 percent of the state's 10th graders passing the basic skills exam required for high school graduation, according to 1986 results released yesterday.

Black students' scores continue to lag behind those of whites, but by a shrinking amount, according to the results. The data released by the state Department of Education also showed that Northern Virginia students still outshine their counterparts statewide.

"This year's test results continue an upward trend that has been evident in Virginia for more than 10 years," S. John Davis, the state superintendent, said in a statement yesterday. Davis called the scores "gratifying."

The scores of the 203,000 Virginia students in the fourth, eighth and 11th grades who took the state-required achievement and ability tests this spring ranged from the 53rd percentile of students nationally for 11th grade social studies to the 67th percentile for eighth grade mathematics. The average score nationally is the 50th percentile, which means that half the students achieved a lower score.

Fourth and 11th grade scores rose between one and two percentage points in each area. Eighth grade scores remained the same or declined by one or two percentage points.

In most subject areas, the achievement test results continued a statewide trend toward fewer students scoring below the 40th percentile nationally and more scoring above the 60th percentile.

Northern Virginia students kept up their record of scores well above both the state and national averages on the tests developed by Science Research Associates in reading, mathematics, language, social studies, science and educational ability. Most Northern Virginia scores were in the 60s and 70s, while most statewide scores were at least several percentage points lower.

On the basic skills test that the state requires school districts to administer, 96.3 percent of 10th graders passed both the reading and mathematics examinations, up from 94.9 percent in 1985. The pass rate on the reading test alone was 97.8 percent, up 0.8 percent from 1985. The pass rate on the math test was 97.5 percent, up from 96.4 percent in 1985.

The racial gap persisted on the test scores, with 92.2 percent of blacks passing both the reading and math exams, compared with 97.7 percent of whites. The size of the difference has narrowed considerably since the examination was first given in 1978.

The gender gap also continued, with 97.1 percent of females passing both tests, compared with 95.6 percent of males.

In all, 69,700 Virginia 10th graders took the test, which students must pass in order to receive a high school diploma.