A div container, which derives its name from the word “division”, serves primarily as a container for other HTML elements. Although it is possible to position groups and sections, div does not have its own semantic features in HTML. Its primary task is therefore to create and delimit areas which can be formatted with CSS. The div container has no influence on a website’s layout or content.
This highlights why the div tag in HTML no longer plays a large role. The div container was used quite often in earlier versions, however its use was massively restricted with the introduction of HTML5 and HTML 5.1. It is recommended to find alternative semantically suitable solutions before using div tag in HTML. The div container should only be used for the layout when no other element can be used, such as the article, aside, header, main, nav or section elements. The div container is inserted as a block-level element in a one line break before and after it.