mxstbr / sharingbuttons.io

Quickly generate social sharing buttons with a tiny performance footprint
http://sharingbuttons.io
MIT License
2.48k stars 103 forks source link

div inside anchor tag is invalid according to w3c #65

Open oknoorap opened 7 years ago

oknoorap commented 7 years ago

Why not convert div tag into span? or some tag that valid on w3c standard?

mxstbr commented 7 years ago

PRs improving the markup are always welcome!

Prinzhorn commented 7 years ago

It is valid in HTM5

Permitted content Transparent, containing either flow content (excluding interactive content) or phrasing content.

https://developer.mozilla.org/en/docs/Web/HTML/Element/a

Content model: Transparent, but there must be no interactive content descendant.

Some elements are described as transparent; they have "transparent" in the description of their content model. The content model of a transparent element is derived from the content model of its parent element: the elements required in the part of the content model that is "transparent" are the same elements as required in the part of the content model of the parent of the transparent element in which the transparent element finds itself.

https://www.w3.org/TR/html5/text-level-semantics.html#the-a-element