Strict indentation is good primarily for two reasons:
- Avoids nesting mishaps.
Helps produce valid HTML.
- It enforces good readability of code.
Helpful when a programmer revisits that code.
Some languages used in front-end development which enforce strict indentation:
- Haml, an HTML template language.
- Jade, another HTML template langauge.
- Stylus, a CSS preprocessor.
There are many advantages to using ID attributes in your HTML that are unique not only to a page, but unique to the entire app.
This is especially more useful while working on someone else’s project. Whenever styles for a specific ID are changed, one can be sure that the new styles won’t be affecting any of the elements on other pages.
Application-wide unique IDs also help reduce testing time and efforts. One doesn’t have to check the entire app to be sure that they haven’t messed up anything due to their recent changes.