The Hausdorff dimension of general Sierpiński carpets

In this note we determine the Hausdorff dimension of a family of planar sets which are generalizations of the classical Cantor set.