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.