Self-closed versus Container Tags
From Textbook
Self-closed Tags
A self-closed tag is the most basic form of a Texpattern tag. Its structure is similar to that of a self-closed tag in XHTML (e.g., <br />), most notably the inclusion of the terminating forward slash. Any self-closed Textpattern tag has the following syntactic structure: <txp:tagname />.
The tag is replaced by contents when Textpattern displays a page.
Self-closed tags can usually take attributes. For example, the following article tag demonstrates using the form and limit attributes: <txp:article form="formName" limit="15" />.
Most Textpattern tags are self-closed tags. The other type of tag is the container tag.
Container Tags
Container tags are composed of both an opening and closing tag element, giving them the syntactic structure of...
<txp:tag_name> ...content added here... </txp:tag_name>
The content that is added between container tags may be either text or other TXP tags.
Typical container tags are the permlink tag: <txp:permlink></txp:permlink> and all conditional tags. Container tags are used when something has to be enclosed by tags instead of being replaced by them.
A link is a good example: you have a text string (or a title tag) around which you want to wrap an HTML anchor element.
<txp:permlink><txp:title /></txp:permlink> bla bla <txp:permlink>Read more...</txp:permlink>
would turn into something like:
<a href="/article/42/this-article-title">This article title</a> bla bla <a href="/article/42/this-article-title">Read more...</a>




