Isolated dots and lines with 6 nm width are written in 20-nm-thick hydrogen silsesquioxane (HSQ) layers on silicon substrates, using 100-keV electron beam lithography. The main factors that might limit the resolution, i.e., beam size, writing strategy, resist material, electron dose, and development process, are discussed. We demonstrate that, by adjusting the development process, a very high resolution can be obtained. We report the achievement of 7 nm lines at a 20-nm pitch written in a 10-nm-thick HSQ layer, using a potassium-hydroxide (KOH)-based developer instead of a classical tetra-methyl-ammonium hydroxide (TMAH) developer. This is the smallest pitch achieved to date using HSQ resist. We think that the resolution can be improved further, and is presently limited by either the beam diameter (which was not measured separately) or by the not-fully-optimized development process.