Why would we want to group html elements together?


This exercise says that divs are good for grouping sections of elements together. Why would we want to group our html elements together?


There are several reasons we might wish to group elements together. Grouping related elements can add a bit more structure to our page which can make our code easier to read, maintain and style later on. Page layout in particular is often better facilitated by strategically grouping elements.