For those attributes that can stretch into infinity and beyond off-screen and do not tolerate white space like urls.
Thanks.
For those attributes that can stretch into infinity and beyond off-screen and do not tolerate white space like urls.
Thanks.
Without knowing exactly what your question refers to, it's hard to say; but it's worth pointing out that html is more or less insensitive to white-space, so
<img src="path/to/image.png" height="200px" width="400px" class="title" id="mainTitle" onClick="alert('clicked')" style="display: block; float: right; position: relative;" />
is equivalent to
<img
src="path/to/image.png"
height="200px"
width="400px"
class="title"
id="mainTitle"
onClick="alert('clicked')"
style="display: block; float: right; position: relative;" />
I'm not wholly certain that it's possible, or valid, to separate the attribute/value pairs across lines, but certainly each pairing can be separated from the next/previous pair.
Incidentally, even Notepad allows for line-wrapping (under 'edit' or 'view', I'm not sure which since I switched to Linux full-time a few years back).
There is nothing to stop you breaking attribute lists or attribute values over multiple lines.
<div class="thing"
title="Foo,
bar,
bof
"
>
zot
</div>
XHTML 1.0 section C.5 recommends avoiding attribute value newlines for legacy browser support reasons, but the browsers that got this wrong are long gone now.
However note that whilst some browsers will treat newlines in an attribute value as actual newlines, others will convert them to plain spaces.