asparism
asparism

Reputation: 624

Is xlink:href deprecated for svg <image>s?

According to MDN xlink:href, we should use href instead of xlink:href, but on the svg example page (which was last updated July 6, 2017), the attribute in the example is xlink:href.

Does it matter which attribute is used?

Upvotes: 8

Views: 4353

Answers (2)

Gesha
Gesha

Reputation: 921

Yes, xlink:href will be dropped but for now I think the best long term option is to use both attributes together.

Upvotes: 2

Paul LeBeau
Paul LeBeau

Reputation: 101918

The upcoming SVG 2 standard is dropping the requirement for the xlink: prefix. Some browsers support that option, but not all do. The safe (and backward compatible) option for now is to keep using it.

Upvotes: 7

Related Questions