Hello. I am doing an assignment. I just need someone to validate that I did it correctly. According to the book I must: "set the default namespace for the document to the XHTML namespace". I'm a bit confused as to how to do it, but I did this:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!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/html">

I had to do it under XTML 1.0 strict DTD. It also should use the CGI script at http://wizardworks.com/cgi/cart.

Again, I'm not asking someone to do my homework for me. I just need suggestion as to what to do. Thank you. :)

Here is what you need. It has the doctype declared and also the document elements declared. IF you take all that and paste into a notepad and save the document as index.html, then try running it in a browser. You will definitely not see anything other than the title for the page which is "title for your page goes here". Adding something like <p> This is a paragraph</p> within the body tags.

<?xml version="1.0" encoding="UTF-8"?>
<!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" xml:lang="en" lang="en">

  <head>

   <title>Title for your page goes here</title>

  </head>


  <body>



  </body>

</html>

Thank you. I saw where I messed up. Sometimes you just need a fresh pair of eyes to point out errors after staring at code for hours. Thank you very much. :)

You're welcome. Please mark this thread as solved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.