Why do templates contain so many PHP tag pairs?

As always, people copy paste whatever they learned from and IIRC the first style is the coding style of wordpress core.

As you said yourself, when there is a big block of generated HTML it is easier to look at (and balance tags) under the first style, but pragmatic people will use the second whenever that is not the case.

It is really just coding style preference nothing technical behind it.

Leave a Comment