I am creating a JSF web application and currently formulating a template.xhtml
file. Inside my xhtml file I have created a header and a footer using div elements. However, reading up on HTML5 i understand that you can now use <header>
and <footer>
tags.
When trying to implement these tags in MyEclipse they show up as "Unknown Tags". I have checked the doctype declaration and it states <!DOCTYPE html
. I was under the assumption that this is all that it needed to support HTML5.
My Template.xhtml
file is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ace="http://www.icefaces.org/icefaces/components"
xmlns:icecore="http://www.icefaces.org/icefaces/core"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xml:lang="en" lang="en">
<h:head>
<title><ui:insert name="title"></ui:insert></title>
<link href="#{request.contextPath}/resources/css/Template.css" rel="stylesheet" type="text/css"/>
</h:head>
<h:body>
<header></header>
<div id="header">
<ui:insert name="header">
<h1>OAG Reference Data</h1>
</ui:insert>
</div>
<div id="container">
<ui:insert>
<div id="sidebar">
<ui:insert name="sideBar">
<h:form>
<ace:menu type="sliding" zindex="2">
<ace:submenu label="Carrier">
<ace:menuItem value="General Carrier Data" />
<ace:menuItem value="Contact Info" />
<ace:menuItem value="Alliance Membership" />
</ace:submenu>
</ace:menu>
</h:form>
</ui:insert>
</div>
<div id="content">
<ui:insert name="content">
<h1>Content</h1>
</ui:insert>
</div>
</ui:insert>
</div>
<div id="footer">
<ui:insert name="footer">
<h1>Footer#{bundle['application.defaultpage.footer.content']}</h1>
</ui:insert>
</div>
</h:body>
</html>
I feel that I have misunderstood something along the way. I would appreciate if anyone can clear this up for me.
Thanks