Facebook Instant Articles error "HTML element does not contain text: Avoid including empty HTML elements"

In many articles imported from my development channel on Facebook Instant Articles, I get the error message "HTML element does not contain text: avoid including empty HTML elements." This appears to be related to images in drawings without other content. Can someone tell me what he is complaining about? My markup seems to fit Facebook's own example of a simple image inside a picture tag, so what's the problem?

enter image description here

+4
source share
4 answers

, Facebook <p>, , . , Facebook, <p></p>:

enter image description here

, . . . ( , , <p>.) :

enter image description here

FB .

, , <p><img src="..."></p>. FB , <p> .

+9

, <img >:

<figure>
    <img src="https://test.files.wordpress.com/2015/07/selleck1.jpg?quality=60&strip=all />
</figure>

, Facebook XML (!), .

- <img> ( XHTML, HTML5).

0

PIA for wordpress sites, all this content happens between tags

and it ultimately generates one <p> empty <\p>. To do this, you need to go through your content and remove all these empty tags.

0
source

Just open the warning tagged article in edit and update mode. This will be fixed.

-1
source

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


All Articles