V
V
voidby2011-07-12 12:59:31
HTML
voidby, 2011-07-12 12:59:31

Social media button validation?

How to make a subject?
For example, the Google+ button code

<g:plusone size="medium"></g:plusone>

Element g:plusone not allowed as child of element td in this context. (Suppressing further errors from this subtree.)
With Facebook in general —
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=http://habrahabr.ru/& layout=standard&amp&show_faces=false&amp&width=450&amp&action=like&amp&colorscheme=light&amp&height=35&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:450px; height:35px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;<br/>

The validator ( validator.w3.org ) swears at all "&" characters - & did not start a character reference. (& probably should have been escaped as &.)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin Kitmanov, 2011-07-12
@voidby

For the first one, you need to add a namespace:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:g="http://google.com/"> 

However, it seems that the namespace can be added directly to the element itself.
For the second, replace all & with &

T
TrueChaotic, 2011-07-15
@TrueChaotic

I'm inserting social buttons into a page with JS. Because JS is still needed for the work of various social buttons, and they do not carry any useful information load, for example, for indexing.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question