What does 5' and 3' mean in DNA and RNA strands?
The 5' and 3' mean "five prime" and "three prime", which indicate the carbon numbers in the DNA's sugar backbone. The 5' carbon has a phosphate group attached to it and the 3' carbon a hydroxyl (-OH) group. This asymmetry gives a DNA strand a "direction". For example, DNA polymerase works in a 5' -> 3' direction, that is, it adds nucleotides to the 3' end of the molecule (the -OH group is not shown in diagram), thus advancing to that direction (downwards).
The five carbons in the ribose backbone are numbered starting from the O in clockwise direction* - therefore the carbon which has the base (A, T, C, G) attached is called 1'. The 2' carbon does nothing special, the 3' carbon has an OH group (downwards dash in the diagram), the 4' carbon connects the ribose ring to 1' via the O bond, and the 5' carbon is outside of the ring, attached to the 4' carbon on one side and phosphate on the other. PS: *) strictly, it's not after the ring direction but rather it comes from the linear configuration, i.e. when ribose is not in ring form.
The no 5 and 3 are the carbon no of the carbon skeleton ring of deoxyribose as similar as any other organic compound. In any nucleic acid, RNA or DNA 3' refers to the 3rd carbon of sugar ribose or deoxyribose which is linked to OH group and 5' linked to a triple phosphate group. So these 5' and 3' group provide a directional polarity to the DNA or RNA molecule. Now a good question would be y 3' and 5' not 3 and 5. It is simply to differentiate sugar carbons from that of the bases which are also having a carbon skeleton and thus nos for their carbon