I might be bad at indenting, ok, but THIS...
THIS is one of the worst thing I've ever seen for HTML

  • 0
    I would keep class on the <i line, and then indent the aria and click one time. Then put the ending </i> on the (click) line.
  • 2
    Aren't there tools to reformat the code as part of precommit hooks or a build step to enforce this?
  • 1
    I do basically the same, but I indent the attributes.
  • 0
    This is good formatting for XML as they are for storing data and this makes it Readable, for HTML it's not very useful.

    Are you sure you have set correct formatting mode?
  • 1
    @theabbie I'm using atom, I don't have a format to set I guess
  • 1
    Using react and jsx its a pretty meaningful indentation
  • 1
    I’ll sometimes break out HTML like this if I have a lot of attributes on something like if I’m using AOS.
Add Comment