If you don't need the features provided by the JSF tag, I'd prefer to use plain HTML.
For example, <h:panelGroup>
has a rendered
attribute that allows you bind to a backing bean boolean variable to conditionally display the output, but with a <div>
or <span>
, you cannot do this.
The <h:panelGroup>
will by default generate a <span>
. If you prefer a <div>
, then you can use <h:panelGroup layout="block">
. It will generate a <div>
for you .