: HTML coding style: attribute starts on a new line sublvl's front end developer seems to have a strange coding style that I've never seen before. Every time they begin a new element, immediately
sublvl's front end developer seems to have a strange coding style that I've never seen before. Every time they begin a new element, immediately after the element name they insert a line break. The first thing that appears on the next line is the first attribute of the element. For example:
id="player-container"><div
id="player-bar"><div
id="player-controls-wrapper"><div
id="player-controls"><div
id ="player-controls-buttons"> <a
The above code was found here.
I've never seen this kind of coding style before. What's going on here? Is this just a quirky style or is there some reasoning behind it?
More posts by @Annie201
1 Comments
Sorted by latest first Latest Oldest Best
It appears to be minification by the W3 Total Cache WordPress plugin. This strategy of inserting a line break at the end of the element name seems to be to prevent the line length from becoming too excessive, while taking advantage of the fact that a line break is valid white space for separating tokens in HTML.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.