The present paper aimed at studying the vertical and horizontal spatial distribution, species richness and diversity of vascular plants in different urban ecological niches (urban habitats) by means of the case study of Bologna (Italy), a typical densely populated southern European city. A total of 477 species were found in the study area of the historical city centre, 30% of which were alien species. Alien plant species were mainly present among phanerophytes, while native plants were mainly therophytes and hemicryptophytes. The habitats that mostly contributed to the species total richness were semi-natural soils, followed by paved areas, walls, rooftops and manholes. The number of exclusive species decreased according to the selectiveness of the habitat, with manholes and rooftops being the most selective. The presence of hemicryptophytes constant decreased going from 27% of more humid habitats to 5% of more arid habitats, so that they can be considered a water availability biomarker. Urban habitat quality, measured by the number of native species, was directly proportional to the strength of selective factors and inversely proportional to the rate of disturbance, with roofs and semi-natural soils having, respectively, the highest and lowest quality. Finally, a relation between species richness and street characteristics, like width, orientation and type of flooring, was demonstrated.