Interesting markup. I have as many comments as flat-out errors.
<!-- Copyright (C) 2012, Frobozz Training. All Rights Reserved. -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="frobozz.css" type="text/css"?>
Crap before doctype (though that only matters to IE6 and 7 nowadays, and neither of them can really read this markup)
The XML declaration isn’t bad but I doubt that’s what the newbie was going for
The second XML declaration actually is also ok but also doubt that’s what the newbie was going for.
The OP may have totally meant to use Basic, but then in that case I guess we’d recommend they skip it if they want to target mobiles cause nobody has a Gordon Gecko brickphone anymore.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
"http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
Technically the only thing wrong here is Basic (for mobiles) has a more recent version, 1.1.
<head>
<[color=red]T[/color]itle>
But if one is going to use XML, lowercase matters. Real Error #1.
Frobozz Training: Search Course Database
</title>
<link rel="stylesheet" href="frobozz.css" type="text/css" />
I suppose the re-stating of the stylesheet in the head will simply override the one listed earlier.
<[b]style[/b] type="text/css">
body {
background-color: grey;
}
/* This section commented out for testing
div { margin:100px } /* main section*/
p {
margin: 0 1em
}
finished testing
*/
[color=red]</script>[/color]<style type="text/css">
th {
color: silver;
}
</style>
Basic 1.1 supports style tags. I’m not certain but I didn’t think 1.0 did.
Basic 1.1 supports script tags, but 1.0 did not. Error closing script tag without opening script tag anyway. Real error #2.
Without the error closing script tag, the browsers running this page as XHTML Basic 1.0 may have simply ignored the style tags in the head and moved on. Instead there will now be a parsing error and the world will stop turning.
</head>
<body>
[color=red]<img src="Logo" title="This a Great Logo" alt="This a Great Logo">[/color]
inlines may not be a direct child of the body element. Img is EMPTY and must be closed />. src must be a real URI though depending on the backend this might be a valid URI. 2 real errors.
<div id="box1">
<div id="_content">
[b]<h2>[/b]
Course Search Page
</h2>
I would not start with an h2. Leading underscore should be totally valid for id name though.
<p>
Below is a Course Search form enabling you the user to
search our database on see how many students have
enrolled on any of our courses which can be selected
via the dropdown menu:
[color=red]</P>[/color]
capitals no no in XML. 1 real error.
<form action="search.php" method="get">
<div>
<label>Search Places Available by Subject: <select>
<option>
Basic IT
</option>
<option>
Web Page Design L2
</option>
<option>
Web Page Design L3
</option>
</select></label> <input type="submit"
values="Search..." />
</div>
</form>
I think the above is technically correct, since the OP only has Basic forms available since this is Basic version 1.0. I would argue different semantics if the doctype were otherwise, like fieldsets and not wrapping the select with a label, etc.
<h2>
Table of Search Results
</h2>
<table>
<tr>
[color=red]<td>
<th>Course Name</th>[/color]
The td must be closed before opening a th. Td’s cannot be direct parents of th’s. Since this is XML we don’t get any implied closing block elements. 1 real error.
<table [color=red]border="1"[/color] summary="Results Table">
[color=red]<tr>
<h2>
Course Code
</h2>[/color]
<th><b>
<acronym title="Maximum">Max</abbr> <abbr title="Number">no.</abbr></b>
</th>
Table cannot be a direct child of tr.
Basic 1.0 tables can’t have border attributes. Tr’s must have th or td as direct children.
Abbr and acronym and b are all fine though. If this were a different doctype, I would recommend different semantics.
Would recommend h2 become an h3. 3 real errors.
<th>
<abbr title="Number">No.</abbr> enrolled
</th>
</tr>
<tr>
<td>
Basic IT
</td>
<td>
BIT01
</td>
<td>
30
</td>
<td>
18
</td>
</tr>
<tr>
<td>
Web Page Design L2
</td>
<td>
WEB02
</td>
<td>
20
</td>
<td>
15
</td>
</tr>
<tr>
<td>
Web Page Design L3
</td>
<td>
WEB03
</td>
<td>
16
</td>
<td>
9
</tr>
</table>
[color=red]</td>[/color]
</tr>
</table>
Here’s the closing tag. If there hadn’t been a direct-child th earlier, this closing td wouldn’t have been considered an error.
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing
elit. Mauris sodales, lacus quis vestibulum faucibus,
velit purus lacinia erat, eu suscipit felis urna ut
sapien.
[color=red]<p>
</p>
Lorem ipsum dolor sit amet, consectetuer adipiscing
elit. Mauris sodales, lacus quis vestibulum faucibus,
velit purus lacinia erat, eu suscipit felis urna ut
sapien.
</p>[/color]
Code not well-formed: tag nesting mismatch.
<div class="footer">
<p>
[<a href=[color=red]".../home.htm"[/color]
title="Return to Home Page">Return Home</a>]
</p>
<p>
<b>
Copyright &#copy; 2012, Frobozz Training. All Rights
Reserved.
</b>
</p>
[color=red]<div />[/color]
href doesn’t appear to be a valid URI.
I think if this were purely considered XML the div would be fine. Since this is XML as Basic XHTML this may not be allowed. I would run it through the Basic validator to know for sure.
</div>
</div>
</div>
</body>
</html>
My take on the first one.