Fence and A Wall are two different things!
fence
A fence is a usually wooden or metal structure that encloses a yard, pasture, or other area. Many people with back yard swimming pools put fences around them to make sure small children don’t fall in.
wall (n.)
1. An upright structure of masonry, wood, plaster, or other building material serving to enclose, divide, or protect an area, especially a vertical construction forming an inner partition or exterior siding of a building.
2. A continuous structure of masonry or other material forming a rampart and built for defensive purposes. Often used in the plural.
4. (a) Something resembling a wall in appearance, function, or construction.
See my reply 34 from websters.