M
M
mukzer2021-08-22 18:24:05
HTML
mukzer, 2021-08-22 18:24:05

Can you point out errors in html BEM?

Can you please point out errors in html, specifically for BEM, I'm not sure if I wrote it correctly...
github
doesn't fit all html code here...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
n1ksON, 2021-08-22
@n1ksON

<div class="portfolio__item mix slug paint">
  <a class="portfolio__item-link" href="product-page.html" aria-label="Portfolio photo">
    <img class="portfolio__item-img lazyload" data-src="images/content/portfolio-3.jpg" alt="portfolio-img">
    <div class="portfolio__item-hover">
      <div class="portfolio__item-info">
        <h3 class="portfolio__item-title">Кухня Модерн</h3>
        <h4 class="portfolio__item-subtitle">пластик-шпон</h4>
      </div>
      <p class="portfolio__item-code">артикул 13428</p>
    </div>
  </a>
</div>

It would be better to do something like this:
<div class="portfolio-item mix slug paint">
  <a class="portfolio-item__link" href="product-page.html" aria-label="Portfolio photo">
    <img class="portfolio-item__img lazyload" data-src="images/content/portfolio-3.jpg" alt="portfolio-img">
    <div class="portfolio-item__wrapper_hover">
      <div class="portfolio-item__info">
        <h3 class="portfolio-item__title">Кухня Модерн</h3>
        <h4 class="portfolio-item__subtitle">пластик-шпон</h4>
      </div>
      <p class="portfolio-item__code">артикул 13428</p>
    </div>
  </a>
</div>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question