HtmlHead is a UIOutput that renders a <head> element for webapps, but not for portlets. In the case of portlets, the presence of h:head informs the JSF portlet bridge that JSF resources with target="head" should be included in the <head> element rendered by the portal.

General Usage

The usage of h:head in webapps is the same as with portlets. However, the surrounding tag in a webapp is <html> whereas the surrounding tag in a portlet is f:view.

Source Code

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html">
	<title>This is the title of the Facelet page</title>
	<h:outputText value="This is a Facelet page" />
<?xml version="1.0" encoding="UTF-8"?>
<f:view xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://xmlns.jcp.org/jsf/html" >
	<h:head />
		<h:outputText value="This is a Facelet portlet" />
Liferay Faces Bridge Implementation 5.0.0 + Showcase Common 3.1.1 + Liferay Faces Util 3.4.1 + Mojarra 2.2.20