For a road that has sidewalks on both sides of the road, it is acceptable to walk on the sidewalk on either side of the road (facing oncoming traffic or your back to oncoming traffic) because you are separated from the automobiles.
For a road with a sidewalk only on one side, it is recommended to use the sidewalk for traveling in either direction (with traffic or against traffic). Again the sidewalk helps separate you from the automobiles.
