S
S
Shimpanze2020-02-24 06:37:26
Search Engine Optimization
Shimpanze, 2020-02-24 06:37:26

Which of the markup options is correct?

Hello!

Which of the two menu layout options is the only correct one?

div id="menu">
   <nav itemscope itemtype="http://schema.org/SiteNavigationElement">
      <a href="главная.php" itemprop="url"><span itemprop="name">Главная</span></a>
      <a href="продукция.php" itemprop="url"><span itemprop="name">Продукция</span></a>
      <a href="покупателям.php" itemprop="url"><span itemprop="name">Покупателям</span></a>
   </nav>
</div>


...or:

<div id="menu">
   <nav itemscope itemtype="http://schema.org/SiteNavigationElement">
      <a href="главная.php" itemprop="url name">Главная</a>
      <a href="продукция.php" itemprop="url name">Продукция</a>
      <a href="покупателям.php" itemprop="url name">Покупателям</a>
   </nav>
</div>


And is it necessary to hrefspecify the full address of the site in the attribute: http://site.ru/главная.php?

Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lone Ice, 2020-02-24
@Shimpanze

And is it necessary to specify the full address of the site in the href attribute?

No, it's even harmful.
Which of the two menu layout options is the only correct one?

Purely logically arguing, it seems that the first, but no one does this, because why why shove extra tags into the link.

A
Artem Gvozdev, 2020-02-24
@arty23_03

Look through the Google or Yandex validator, then

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question