4 ms·
Only HTML5 compliant in the sense that it is not illegal. There is no standard semantics for data-attributes, so e.g. Google will not index your links.
by olavk 14y ago
Only HTML5 compliant in the sense that it is not illegal. There is no standard semantics for data-attributes, so e.g. Google will not index your links.
- Mahn 14y agoTrue, I didn't consider that. I guess you could work around this placing all the links you want to be indexed in a hidden div or something similar though. This could be automated via javascript aswell.
- olavk 14y agoIt would be a lot simpler just to use a-elements though :-)
- SquareWheel 14y agoThe anchor text and surrounding paragraph of the link is also important for SEO-value, so I'm afraid that would not work. I think the idea of a shiv is a neat one, but unfortunately not very practical at the moment.
- deno 14y agoWould Google index attributes in XLink namespace? E.g.: <img src="pic.jpg" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="about.html" /> I know they index SVG documents, and there’s no @href in SVG namespace… Would that work for (X)HTML5 documents, either served as HTML or XML document? You’d still need JS polyfill, but at least the semantics remain intact.