Answer the question
In order to leave comments, you need to log in
How to format a block as a link?
Good afternoon. The question is whether it is possible to design a link in this way to make the entire block clickable. Interested in correctness in terms of SEO promotion.
<div class="block__element">
<a href="#"></a>
<img src="<?= SITE_TEMPLATE_PATH; ?>/assets/pictures/image.jpg" alt="" class="block__bg">
<div class="block__title">
<span class="block__title-name">Жилищная инициатива</span>
<p>ул. Попова №150</p>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
Wrap the block in a link.
<a href="какая-то_ссылка">
<div class="block__element">
<img src="<?= SITE_TEMPLATE_PATH; ?>/assets/pictures/image.jpg" alt="" class="block__bg">
<div class="block__title">
<span class="block__title-name">Жилищная инициатива</span>
<p>ул. Попова №150</p>
</div>
</div>
</a>
<div class="block__element">
<a href="какая-то_ссылка">
<img src="<?= SITE_TEMPLATE_PATH; ?>/assets/pictures/image.jpg" alt="" class="block__bg">
<div class="block__title">
<span class="block__title-name">Жилищная инициатива</span>
<p>ул. Попова №150</p>
</div>
</a>
</div>
<div class="block__element">
<a name="какой-то_якорь"></a>
<img src="<?= SITE_TEMPLATE_PATH; ?>/assets/pictures/image.jpg" alt="" class="block__bg">
<div class="block__title">
<span class="block__title-name">Жилищная инициатива</span>
<p>ул. Попова №150</p>
</div>
</div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question