
Michael J. answered 03/28/19
Patient and Experienced Full Stack Developer
There are several ways to accomplish this with Sublime or online "HTML beautifiers". Firstly, while using Sublime Text 2 or 3: highlight the text you want to format, or select all text with 'ctrl + a'. Navigate to the drop down menu
Edit -- Line -- Indent or 'ctrl + ]' to add indentation to all selected text
Edit -- Line -- Unindent or 'ctrl + [' to remove indentation from all selected text
Edit -- Line -- Reindent to revert indentation to its original state before edit
Indent and Unindent will add or remove one indentation at a time. This is useful to remove indentation.
To reformat the entire HTML document with indentation, aligned closing tags, and remove white space: Use an online "HTML beautifier"