1 Replies - 447 Views - Last Post: 08 December 2011 - 11:38 AM

#1 p20111  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 49
  • Joined: 05-December 11

Some HTML help please?

Posted 08 December 2011 - 10:54 AM

I am getting the error;

"Unknown XHTML element "footer" not allowed as child of XHTML element "html".

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

    <head>
        <title>BN Bikes Norwich Mobile</title>
        <link rel="stylesheet" type="text/css" href="mobilesite.css" /> 
    </head>
    <body>
        <h1>BN Bikes Norwich Mobile</h1>
        <p>Welcome to BN Bikes Norwich. We are a bike hire company based in Norwich.</p>   
        <form action="form_action.asp" method="get">
            <div>         
                <label>Number of people in party:<input type="text" /></label><br /> 
                <label>Men's All-Terrain:<input type="text" /></label><br />
                <label>Women's All-Terrain:<input type="text" /></label><br />
                <label>Women's Hybrid:<input type="text" /></label><br /> 
                <label>Tandem:<input type="text" /></label><br /> 
                <label>Child's All-Terrain:<input type="text" /></label><br />
                <h3>Duration</h3>
                <fieldset>
                    <p>Duration:</p>        
                    <select>
                        <option value="Full Day" selected="selected">Full Day</option>
                        <option value="Half Day" selected="selected">Half Day</option>
                    </select>
                </fieldset>
            </div>
        </form>
        <form id="input" action="pay.asp" method="get">
            <p>
                <input type="submit" value="Pay Now" />
                <input type="reset" value="Reset Form" />
            </p>
        </form>
        <p>
            <img alt="Prices" width="400" height="350" src="I:\Prices.jpg"> </img>
        </p>
    </body> 
    <footer>
        <p>Copyright  2011 Atiqah, Chris, Peter. All rights reserved.</p>
    </footer>
</html>



I have tried putting fieldset around it, legend around it, removing the footer tags altogether, etc. but still I get an error. Can someone help please..?

Is This A Good Question/Topic? 0
  • +

Replies To: Some HTML help please?

#2 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1484
  • View blog
  • Posts: 8,204
  • Joined: 07-September 06

Re: Some HTML help please?

Posted 08 December 2011 - 11:38 AM

Well, the first problem is that the DTD that you specified for your file doesn't contain the footer element anywhere. That means you can't use it without getting an error.

Now, if you use HTML5 DTD <!DOCTYPE HTML>, the footer element will exist.

Finally, the problem probably is still happening regardless of whether or not the footer element is actually there is most likely due to browser caching. So clear your cache and see if that helps.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1