Search code examples
htmlcssbem

Using HTML5 Semantic Elements with BEM Methodology


Is it a good practice to use HTML5 semantic elements with BEM? E.g. is

<header class="header header--full">
    <nav class="header__nav">...</nav>
</header>

OK or I should use divs instead?


Solution

  • Use the semantic elements. Your example is exactly how you should do it.