Aims. Our goal is to determine how the spatial correlation function of galaxies describes biasing and fractal properties of the cosmic web. Methods. We calculated spatial correlation functions of galaxies, ξ(r), structure functions, g(r) = 1 + ξ(r), gradient functions, γ(r) = d log g(r)/d log r, and fractal dimension functions, D(r) = 3 + γ(r), using dark matter particles of the biased Λ cold dark matter (CDM) simulation, observed galaxies of the Sloan Digital Sky Survey (SDSS), and simulated galaxies of the Millennium and EAGLE simulations. We analysed how these functions describe fractal and biasing properties of the cosmic web. Results. The correlation functions of the biased ΛCDM model samples at small distances (particle and galaxy separations), r ≤ 2.25 h−1 Mpc, describe the distribution of matter inside dark matter halos. In real and simulated galaxy samples, only the brightest galaxies in clusters are visible, and the transition from clusters to filaments occurs at a distance r ≈ 0.8−1.5 h−1 Mpc. At larger separations, the correlation functions describe the distribution of matter and galaxies in the whole cosmic web. The effective fractal dimension of the cosmic web is a continuous function of the distance (separation). Real and simulated galaxies of low luminosity, Mr ≥ −19, have almost identical correlation lengths and amplitudes, indicating that dwarf galaxies are satellites of brighter galaxies, and do not form a smooth population in voids. Conclusions. The combination of several physical processes (e.g. the formation of halos along the caustics of particle trajectories and the phase synchronisation of density perturbations on various scales) transforms the initial random density field to the current highly non-random density field. Galaxy formation is suppressed in voids, which increases the amplitudes of correlation functions and power spectra of galaxies, and increases the large-scale bias parameter. The combined evidence leads to the large-scale bias parameter of L⋆ galaxies the value b⋆ = 1.85 ± 0.15. We find r0(L⋆) = 7.20 ± 0.19 for the correlation length of L⋆ galaxies.