  We show that a proper open subset $\Omega\subset \rn$ is an extension domain
for $\hp$ ($0<p\le1$), if and only if it satisfies a certain geometric
condition. When $n(\frac{1}{p}-1)\in \mathbb{N}$ this condition is equivalent
to the global Markov condition for $\Omega^c$, for $p=1$ it is stronger, and
when $n(\frac{1}{p}-1)\notin \mathbb{N}\cup \{0\}$ every proper open subset is
an extension domain for $H^p$. It is shown that in each case a linear extension
operator exists. We apply our results to study some complemented subspaces of
$\bmorn$.
