-
Notifications
You must be signed in to change notification settings - Fork 219
Closed
Description
I was wondering whether a tag element which is wrapping other content, is considered a block?
Let's consider this vanilla code:
<div>
<a href='#'>
<p>Some random paragraph</p>
<img src='stylesheets/assets/onion.jpg'>
</a>
</div>
Code below considers a tag as normal element.
<div class="news-box">
<a class="news-box__link" href='#'>
<p class="news__content">Some random paragraph</p>
<img class="news-box__image" src='stylesheets/assets/onion.jpg'>
</a>
</div>
While this code considers a tag as block that wraps p and img:
<div class="news-box">
<a class="news" href='#'>
<p class="news__content">Some random paragraph</p>
<img class="news-__image" src='stylesheets/assets/onion.jpg'>
</a>
</div>
Which approach is better/valid and why?
Metadata
Metadata
Assignees
Labels
No labels