In this paper we prove that sub-Gaussian estimates of heat kernels of regular Dirichlet forms are equivalent to the regularity of measures, two-sided bounds of effective resistances and the locality of semigroups, on strongly recurrent compact metric spaces. Upper bounds of effective resistances imply the compact embedding theorem for domains of Dirichlet forms, and give rise to the existence of Green functions with zero Dirichlet boundary conditions. Green functions play an important role in our analysis. Our emphasis in this paper is on the analytic aspects of deriving two-sided sub-Gaussian bounds of heat kernels. We also give the probabilistic interpretation for each of the main analytic steps.