I would not recommend this as a general practice: it’s very fragile.
If indentation is changed from tabs to spaces, your link may break because spaces in the middle of a URL aren’t skipped (though they are at the start and end).
Although the trick works in HTML attribute syntax, it doesn’t work in various other contexts:
a. In XML syntax, attribute-value normalisation turns those ASCII tabs and newlines into spaces, which aren’t skipped. (You need to use character references like  to get actual tabs and newlines—and they can actually be useful, e.g. in the HTML title attribute.)
b. In CSS and JS, you have to add a trailing \ to allow line breaks in strings (and then the line break is removed—you’ll need the likes of \A in CSS and \n in JS to actually insert a carriage return).
As for data: URIs, those shown aren’t even really depending on this stripping behaviour, their contents don’t mind extra ASCII whitespace. I’ve definitely written data:image/svg+xml,… URLs on multiple lines before, but then concatenated them once I’m done tweaking it, since it’s probably in CSS I’m using it.
chrismorgan | 10 hours ago
Surprisingly not linked: URL Standard.
I would not recommend this as a general practice: it’s very fragile.
If indentation is changed from tabs to spaces, your link may break because spaces in the middle of a URL aren’t skipped (though they are at the start and end).
Although the trick works in HTML attribute syntax, it doesn’t work in various other contexts:
a. In XML syntax, attribute-value normalisation turns those ASCII tabs and newlines into spaces, which aren’t skipped. (You need to use character references like
to get actual tabs and newlines—and they can actually be useful, e.g. in the HTMLtitleattribute.)b. In CSS and JS, you have to add a trailing
\to allow line breaks in strings (and then the line break is removed—you’ll need the likes of\Ain CSS and\nin JS to actually insert a carriage return).As for
data:URIs, those shown aren’t even really depending on this stripping behaviour, their contents don’t mind extra ASCII whitespace. I’ve definitely writtendata:image/svg+xml,…URLs on multiple lines before, but then concatenated them once I’m done tweaking it, since it’s probably in CSS I’m using it.