We propose a way to create effective plane fractals for confined electrons by chemical surface doping in two-dimensional materials. In particular, for Sierpinski carpet (SC), we consider the adsorption of hydrogen or fluorine atoms on monolayer graphene, forming an effective fractional geometry (H-SC and F-SC). By calculating the spatial distribution of states and the fractal analysis of quantum conductance fluctuations of H-SC, F-SC, and real SC, we find there is a consistency of the electronic states in these different systems. Further optical calculations verified the fractional confinement of electrons in H-SC and F-SC. Our results indicate that the chemical surface doping on graphene is an efficient and accessible approach to confine the electrons roaming in a fractional dimension, and will stimulate further theoretical and experimental studies of fractals based on twodimensional materials.