This representation of rings is known as the Haworth formula.
eg: cyclic forms of D-glucose
To generate the Haworth formulas of the cyclic forms of a monosaccharide, use the following procedure, explained using the pyranoses of D-glucose.
Step 1: Draw the Fischer projection of the acyclic form of D-glucose. (See D,L convention)
Step 2: Number the carbon chain in 1 starting at the top.
Step 3: To generate the pyranose ring, the oxygen atom on C-5 in 1 needs to be attached to C-1 by a single bond.
In 1, C-1 is behind the plane of the paper and the hydroxy group on C-5 is in front. For the pyranose ring to be planar, both C-1 and the hydroxy group on C-5 have to be either behind or in front of the plane of the paper. C-5 is a chiral center. In order to bring the hydroxy group on C-5 to the site occupied by the CH2OH group without changing the absolute configuration at C-5, rotate the three ligands H, OH, and CH2OH on C-5 in 1 clockwise without moving the fourth ligand. (See Fischer projection)
1 and 2 both represent D-glucose, but, in 2, unlike in 1, C-1 and the hydroxy group on C-5 are on the same side of the plane of the paper.
Step 4: Ignore that 2 is a Fischer projection and rotate it clockwise by 90º.
Step 5: Redraw the atom chain along the horizontal axis as follows.
Step 6: Add the ligands on C-2 through C-5 in 4. The ligands pointing up in 3 are pointing up in 4; those pointing down in 3 are pointing down in 4.
Step 7: Remove the hydrogen atom and the oxygen atom on C-1 and the hydrogen atom in the hydroxy group on C-5 in 5 and connect the two atoms by a single bond.
Step 8: Add the two remaining bonds to C-1 in 6.
Step 9: Attach a hydrogen atom to the bond pointing up and a hydroxy group to the bond pointing down on C-1 in 7.
Step 10: Interchange the hydrogen atom and the hydroxy group on C-1 in 8.
8 and 9 are the Haworth formulas of the pyranoses of D-glucose.
If, in the acyclic form of a monosaccharide, the hydroxy group that reacts with the carbonyl carbon is not on a chiral carbon (eg: D-fructose→pyranoses), skip step 3.