Content deleted Content added
Tag: Reverted |
m Reverted edits by 2402:3A80:15EB:D007:6169:DB3F:9F:79E9 (talk): unexplained content removal (HG) (3.4.10) |
||
Line 24:
==Examples of use==
===HTML===
An [[HTML]] fragment embedding a picture of a small red dot: [[File:Red-dot-5px.png]]
<syntaxhighlight lang="html4strict">
<img src="data:image/png;base64,iVBORw0KGgoAAA
ANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4
//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU
5ErkJggg==" alt="Red dot" />
</syntaxhighlight>
In this example, the lines are broken for formatting purposes. In actual URIs,
including data URIs, control characters (ASCII 0 to 31, and 127) and spaces (ASCII 32) are "excluded characters". This means that [[whitespace character]]s are not permitted in data URIs. However, in the context of HTML 4 and HTML 5, linefeeds within an element attribute value (such as the "src" above) are ignored{{Citation needed|reason=linefeeds are signifcant in the title attribute, so not ignored in HTML attributes|date=August 2017}}. So the data URI above would be processed ignoring the linefeeds, giving the correct result. But note that this is an HTML feature, not a data URI feature, and in other contexts, it is not possible to rely on whitespace within the URI being ignored.
===CSS===
|