Where to place main element

I’m not sure if this really even matters, but I was curious on where to place the main element on a site.

Is it better to place it on the layout page like

or on each content page like

Mainly wondering if having the dmx-view div in or out of main matters or if it just comes down to preference.

As you have it in the example is correct. Keep in mind that main is purely a semantic element like header and footer and has no further purpose. Despite that, it can be styled and manipulated like any other element. In contrast to the header and footer, both of which can be reused in different divisions/sections/articles, main can be used just once per document.

2 Likes

Were you saying the first example where it is in the layout is correct? or the one on each content page?

Sorry, the first example.

1 Like