In the past decade, the feature size in ultra large-scale integration (ULSI) has been continuously decreasing, leading to nanostructure fabrication. Nowadays, various lithographic techniques ranging from conventional methods (e.g. photolithography, x-rays) to unconventional ones (e.g. nanoimprint lithography, self-assembled monolayers) are used to create small features. Among all these, resist-based electron beam lithography (EBL) seems to be the most suitable technique when nanostructures are desired. The achievement of sub-20-nm structures using EBL is a very sensitive process determined by various factors, starting with the choice of resist material and ending with the development process. After a short introduction to nanolithography, a framework for the nanofabrication process is presented. To obtain finer patterns, improvements of the material properties of the resist are very important. The present review gives an overview of the best resolution obtained with several types of both organic and inorganic resists. For each resist, the advantages and disadvantages are presented. Although very small features (2-5 nm) have been obtained with PMMA and inorganic metal halides, for the former resist the low etch resistance and instability of the pattern, and for the latter the delicate handling of the samples and the difficulties encountered in the spinning session, prevent the wider use of these e-beam resists in nanostructure fabrication. A relatively new e-beam resist, hydrogen silsesquioxane (HSQ), is very suitable when aiming for sub-20-nm resolution. The changes that this resist undergoes before, during and after electron beam exposure are discussed and the influence of various parameters (e.g. pre-baking, exposure dose, writing strategy, development process) on the resolution is presented. In general, high resolution can be obtained using ultrathin resist layers and when the exposure is performed at high acceleration voltages. Usually, one of the properties of the resist material is improved to the detriment of another. It has been demonstrated that aging, baking at low temperature, immediate exposure after spin coating, the use of a weak developer and development at a low temperature increase the sensitivity but decrease the contrast. The surface roughness is more pronounced at low exposure doses (high sensitivity) and high baking temperatures. A delay between exposure and development seems to increase both contrast and the sensitivity of samples which are stored in a vacuum after exposure, compared to those stored in air. Due to its relative novelty, the capabilities of HSQ have not been completely explored, hence there is still room for improvement. Applications of this electron beam resist in lithographic techniques other than EBL are also discussed. Finally, conclusions and an outlook are presented.