!DOCTYPE html PUBLIC

January 25, 2011 at 17:56:22
Specs: Windows 7
<!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" dir="ltr">
<head>
<title>Highest Waterfalls</title>
<script type="text/javascript"
/*<![CDATA>*/
/*
This document prints the names, locations, and heights of the 10 highest waterfalls in the world.
//
document.write("<H1>Don's Jungle Tours</H1>");
/*]]> */
</script>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="js_styles.css" type="text/css" />
<body>
<h1>Highest Waterfalls</h1>

The names, locations, and heights of the 10 highest waterfalls in the world are as follows:</p>
<script type="text/javascript">
/* <![CDATA[ */
document.Write("<table><colgroup span="3" width="20%"");
document.Write("<tr><th>Name</th><th>Location</th><th>Height (in meters)</th></tr>");
document.Write("<tr><td>Angel (upper fall)</td><td>Venezuela</td><td>807</td></tr>";
document.Write("<tr><td>Itatinga</td><td>Brazil</td><td>628</td></tr>");
document.Write("<tr><td>Cuquenan</td><td>Guyana/Venezuela</td><td>610</td></tr>);
document.Write("<tr><td>Ormeli</td><td>Norway</td><td>563</td></tr>");
document.Write("<tr><td>Tysse</td><td>Norway</td><td>533</td></tr>");
document.Write("<tr><td>Pilao</td><td>Brazil</td><td>524</td></tr>");
document.Write("<tr><td>Ribbon</td><td>USA</td><td>491</td></tr>");
document.Write("<tr><td>Vestre Mardola</td><td>Norway</td><td>468</td></tr>");
document.Write("<tr><td>Kaieteur</td><td>Guyana</td><td>457</td></tr>");
document.Write("<tr><td>Cleve-Garth</td><td>New Zealand</td><td>450</td></tr>");
document.Write("</table>");
/* ]]> */
</script>
</script>

</body>
</html>


See More: !DOCTYPE html PUBLIC

Report •


#1
January 25, 2011 at 19:01:33
Well, that's a stupid way of doing it.


Glad I could help.


Report •

#2
January 25, 2011 at 20:20:49
In my archaic browser,

Error: syntax error
Source File: file:///C:/Documents%20and%20Settings/me/Desktop/h.html
Line: 13
Source Code:
<![CDATA>*/

Error: missing ) after argument list
Source File: file:///C:/Documents%20and%20Settings/me/Desktop/h.html
Line: 28, Column: 43
Source Code:
document.Write("<table><colgroup span="3" width="20%"");

the second error, at least, can be fixed by escaping the inner quotes or using ' instead...


Report •

#3
February 1, 2011 at 15:48:06
A few things:

1.) You have a header1 element in your document's head. They belong only in the document body.
2.) The header1 element is capitalized. All xHTML elements must be lowercase to abide by standards.
3.) The order of elements the header should be: Doctype, <html> (w/ xml and language defined), <head>, meta (define content type and character set), title, then all the rest of the header information.
4.) Right after the title, you opened a script element, but didn't close the opening tag.
5.) Now with HTML5, you don't need to specify script tags as text/javascript. That's implied unless otherwise specified.
6.) You never closed your document head.
7.) After the "Highest Watefalls" header1, you have text followed by a closing paragraph tag, but never opened the paragraph.
8.) If you use apostrophes to encase a section, you need to use quotes to encase a subsection. Example:
document.Write("<table><colgroup span='3' width='20%'");
9.) You didn't close the colgroup element.
10.) You have two closing script tags after your table.
11.) Why did you enclose each line of the table in a Javascript document.write? The content isn't dynamic, so why use the Javascript?

That should keep you busy for a while. Clean up those and I or someone will take another look.


Report •

Related Solutions

#4
April 1, 2011 at 21:58:27
Wow you answered all of her homework.

I was stumped on this line:

document.Write("<table><colgroup span='3' width='20%'");

Thanks for the help.


Report •

#5
April 1, 2011 at 22:06:02
<!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" dir="ltr">
<head>
<title>Highest Waterfalls</title>
<script type="text/javascript">
/* <![CDATA[ */
/*
This document prints the names, locations, and heights of the 10 highest waterfalls in the world.
//
document.write("<h1>Don's Jungle Tours</h1>");
/* ]]> */
</script>

<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="js_styles.css" type="text/css" />
</head>
<body>
<h1>Highest Waterfalls</h1>


The names, locations, and heights of the 10 highest waterfalls in the world are as follows:


<script type="text/javascript">
/*<![CDATA[ */
document.write("<table><colgroup span='3' width='20%'>");
document.write("<tr><th>Name</th><th>Location</th><th>Height (in meters)</th></tr>");
document.write("<tr><td>Angel (upper fall)</td><td>Venezuela</td><td>807</td></tr>");
document.write("<tr><td>Itatinga</td><td>Brazil</td><td>628</td></tr>");
document.write("<tr><td>Cuquenan</td><td>Guyana/Venezuela</td><td>610</td></tr>");
document.write("<tr><td>Ormeli</td><td>Norway</td><td>563</td></tr>");
document.write("<tr><td>Tysse</td><td>Norway</td><td>533</td></tr>");
document.write("<tr><td>Pilao</td><td>Brazil</td><td>524</td></tr>");
document.write("<tr><td>Ribbon</td><td>USA</td><td>491</td></tr>");
document.write("<tr><td>Vestre Mardola</td><td>Norway</td><td>468</td></tr>");
document.write("<tr><td>Kaieteur</td><td>Guyana</td><td>457</td></tr>");
document.write("<tr><td>Cleve-Garth</td><td>New Zealand</td><td>450</td></tr>");
document.write("</table>");
/* ]]> */
</script>
</body>
</html>


Report •


Ask Question