Multiple and repeated phone numbers in Microdata
I'm creating Microdata for an organisation and was wondering about the correct way to add multiple phone numbers to a site.
This are a few options I've got in mind:
1:
<ul itemprop="telephone">
<li><a target="_blank" rel="nofollow noreferrer" target="_blank" rel="nofollow noreferrer" href="tel:0123132123">Line 1 0123 132 123</a></li>
<li><a target="_blank" rel="nofollow noreferrer" target="_blank" rel="nofollow noreferrer" href="tel:0123546334">Line 2 0123 546 334</a></li>
<li><a target="_blank" rel="nofollow noreferrer" target="_blank" rel="nofollow noreferrer" href="tel:01233456">Line 3 01233456</a></li>
</ul>
2:
<ul>
<li><a target="_blank" rel="nofollow noreferrer" target="_blank" rel="nofollow noreferrer" href="tel:0123132123" itemprop="telephone"> Line 1 0123 132 123</a></li>
<li><a target="_blank" rel="nofollow noreferrer" target="_blank" rel="nofollow noreferrer" href="tel:0123546334" itemprop="telephone">Line 2 0123 546 334</a></li>
<li><a target="_blank" rel="nofollow noreferrer" target="_blank" rel="nofollow noreferrer" href="tel:01233456" itemprop="telephone">Line 3 01233456</a></li>
</ul>
3:
<ul>
<li><a target="_blank" rel="nofollow noreferrer" target="_blank" rel="nofollow noreferrer" href="tel:0123132123"> Line 1 <span itemprop="telephone">0123 132 123</span></a></li>
<li><a target="_blank" rel="nofollow noreferrer" target="_blank" rel="nofollow noreferrer" href="tel:0123546334">Line 2 <span itemprop="telephone">0123 546 334</span></a></li>
<li><a target="_blank" rel="nofollow noreferrer" target="_blank" rel="nofollow noreferrer" href="tel:01233456">Line 3 <span itemprop="telephone">01233456</span></a></li>
</ul>
Also, if the same number has been repeated on a page, will that cause an error even if they are under the same itemscope
?
Example:
<body itemscope itemtype="http://schema.org/Organization">
<span itemprop="telephone">01233456</span>
<!-- data -->
<!-- data -->
<span itemprop="telephone">01233456</span>
<!-- data -->
<!-- data -->
<span itemprop="telephone">01233456</span>
</body>
Answer
The telephone
property expects Text as value. If you want to follow this advice, you should provide this property on an element that generates a string value in Microdata (e.g. span
) instead of an element that generates a URL value (e.g., a
).
And if you want to provide multiple telephone
values, you have to repeat the property. Providing multiple properties with the same value is not an error, but also not useful (I’d try to avoid it; simply don’t mark up the repeated telephone numbers in the same item).
So example 3 is correct.
Note that there is a feature request to also expect URL values for telephone
. If this happens, your example 2 would also be in line with Schema.org’s advice.
Example 1 would represent one telephone number (Line 1 0123 132 123 Line 2 0123 546 334 Line 3 01233456
), so it’s not correct.
Related Questions
- → October CMS create a multi select Form field
- → How to update data attribute on Ajax complete
- → laravel blade templating error
- → should I choose reactjs+f7 or f7+vue.js?
- → How to dynamically add class to parent div of focused input field?
- → Setting the maxlength of text in an element that is displayed
- → Undefined Result for Variable with Javascript innerHTML function
- → Expanding search bar not expanding before search
- → Get the calling element with vue.js
- → Blade: how to include a section in one page but not in another
- → How to print/log reactjs rendered dom?
- → how to write react component to construct HTML DOM
- → How to add a timer in HTML5 and Javascript?