When developing for the web you will inevitably end up referencing a lot of files that eventually all get included and combined into a finished product. I specifically develop a lot of Wordpress sites and, as an example, the project I'm working on right now includes a file called footer.php which simply contains this code:
<?php wp_footer(); ?> </body> </html>
Now I'm aware what I'm asking is absolutely non-critical but I'm wondering if there are any established best practices for things like code indentation and other formatting issues within included files. The body tag is obviously nested within the html tag, so should that indentation be kept inside footer.php? At the same time it feels kind of strange to start a file by potentially indenting the first line of code a lot of times depending on where it's included, but it might end up making a big mess if you open a lot of nested tags in a different file, don't account for the nesting in your new file but then close them all in the new file.