A theory of resource-bounded dimension is developed using gales, which are natural generalizations of martingales. When the resource bound $\Delta$ (a parameter of the theory) is unrestricted, the resulting dimension is precisely the classical Hausdorff dimension (sometimes called "fractal dimension"). Other choices of the parameter $\Delta$ yield internal dimension theories in E, E2, ESPACE, and other complexity classes, and in the class of all decidable problems. In general, if $\mathcal{C}$ is such a class, then every set X of languages has a dimension in $\mathcal{C}$, which is a real number $\dim (X \mid \mathcal{C}) \in [0, 1]$. Along with the elements of this theory, two preliminary applications are presented: For every real number $0 \le \alpha \le \frac 1 2$, the set ${\rm FREQ}(\le \alpha)$, consisting of all languages that asymptotically contain at most $\alpha$ of all strings, has dimension $\mathcal{H}(\alpha)$---the binary entropy of $\alpha$---in E and in E2. For every real number $0 \le \alpha \le 1$, the set ${\rm SIZE}(\alpha \frac {2^n} n)$, consisting of all languages decidable by Boolean circuits of at most $\alpha \frac {2^n} n$ gates, has dimension $\alpha$ in ESPACE.