I have downloaded a Wordpress theme and is modifying the code to make it look more like I want. On many places I come across things like this:
<div class="class-1">
<div class="class-2">
<!-- Content here -->
</div>
</div>
I know that you can write them together like this to save both on bytes and (for me) readability, especially since there can be 3-4 layers of these on many many places:
<div class="class-1 class-2">
<!-- Content here -->
</div>
- Is there any reason to keep the divs separated regarding performance, compatibility, securety or other?
- Am I risking something when lumping them together, or is the code intepreted the same way by the compiler?