does breaking inline styling into multiple lines affect anything?
Asked Answered
L

2

13

let's say I have a very long line of inline styling, for example:

<input type="radio" style="visibility: hidden; position: absolute; foo: bar; baz: foo; etcetera: etc; and: more;">

and then I decide to make it more readable like this:

<input type="radio" style="visibility: hidden; position: absolute;
    foo: bar; baz: foo; etcetera: etc; and: more;">

Does this affect the functionality or is it okay to break it into multiple lines like this?

Lonesome answered 12/7, 2012 at 17:21 Comment(2)
I'm sure you've heard this before, but avoid inline styles and you won't even have to worry :)Hedelman
Yes I have, and I agree. I'm just cleaning up other people's code that's really poorly formatted..it's a nightmare to read and maintain.Lonesome
L
10

It's fine. White space doesn't affect the browsers interpretation of that CSS or rendering of that element.

Liberalism answered 12/7, 2012 at 17:22 Comment(0)
F
0

its actually do in img tag

code: image that show you multiline inline styling

result: image that show you result with unwanted special character added to the style

Fulani answered 4/1, 2023 at 4:48 Comment(1)
meta.#286051Cobbs

© 2022 - 2024 — McMap. All rights reserved.