Microdata without span tag

I have a website where the developer applies CSS to the <span> tag base, which makes the tag effectively useless for marking microdata if I do not want all the text to be blue, bold and 125% larger than usual. Are there alternative tags that I can use? I understand that I can use <meta> but I really want the content to appear, and it seems like it is too complicated to write it twice.

0
source share
2 answers

You can use every HTML5 element for Microdata. Please note that some elements have special rules for determining the value, and some elements with additional requirements when used with Microdata.

If your question is whether there is another HTML5 built-in element that doesn't matter (= span): no, isnt.

If your question is how to use it spanwithout applying CSS: add elements classto yours spanand overwrite any CSS that you use with the CSS class selector:

<span class="never-style-span-directly" itemprop="example">…</span>

CSS:

span {color:blue;}
.never-style-span-directly {color:inherit;}
0
source

- <span class="blueLargerTextWhyOhWhy"> ( ) , .

.

, :)

0

Source: https://habr.com/ru/post/1536186/


All Articles