HTML HTML Basics Structuring Your Content Structuring Your Content Review

Which element should be used only when no other semantic like article or aside are appropriate?

I thought <div> just structures the content so its not too wide or narrow on the browser

1 Answer

David Perkins
David Perkins
9,607 Points

Broadly speaking... the div element (without any styling) can't really do anything in terms of controlling widths, it's purely a block level element and as such can be used as a container or placeholder for almost anything. Your styling will dictate how a div is rendered in the browser.

Without styling, you won't even know that content is contained within a div (unless you view the source of the page).