XHtml Help

Associate
Joined
12 Jun 2005
Posts
836
Location
Newcastle
Right, doing a website for my Part Time Degree, cannot get this page to go through the validator.

Code:
<form method="post" action="mailto:[email protected]">
		<font face="verdana" size="2" color="black">
		<table width="641" align="center">	
						
					  <tr><td>First Name</td><td><input type="text" name="First_Name" size="15" maxlength="25" value="" /></td>

                                           <td>Second Name</td><td><input type="text" name="Second_Name" size="15" maxlength="25" value="" /></td></tr>

					    <tr><td>Address Line 1</td><td><input type="text" name="Address1" size="25" maxlength="25" value="" /></td>

					     <td>Address Line 2</td><td><input type="text" name="Address2" size="25" maxlength="25" value="" /></td></tr>

					      <tr><td>Address Line 3</td><td><input type="text" name="Address3" size="25" maxlength="25" value="" /></td>

					       <td>Postcode</td><td><input type="text" name="Postcode" size="7" maxlength="7" value="" /></td></tr>

					        <tr><td>Telephone Number</td><td><input type="text" name="Telephone" size="11" maxlength="11" value="" /></td>

					         <td>Mobile Number</td><td><input type="text" name="Mobile" size="11" maxlength="11" value="" /></td></tr>

					          <tr><td>Email Address</td><td><input type="text" name="Email" size="30" maxlength="50" value="" /></td></tr>

					           <tr>
						    <td>Nature Of Enquiry</td>
						     <td>
						      <select name="Equiry">
							<option value="sales">Sales</option>
							<option value="general">General</option>
							<option value="directions">Directions</option>
						       </select>
						      </td>
						   </tr>
						   <tr>
						      <td>Enquiry</td>
						      <td>
						        <textarea rows="5" cols="20"></textarea>
						      </td>
						   </tr>
		</table>
						
		
																	
		<table width="80%" align="center">
		<tr>
		<td align="center">
			<input type="submit" value="Submit" />
			<input type="reset" value="Reset" />
		</td>
		</tr>
		
		
		</table>
		</font>
		</form>

Basically it doesnt like the table tags. Any ideas? :confused: :mad:
 
toosepin said:
Can you post the whole page please? I need to know the doctype :)

Cheers mate, driving me nuts, its only this one page that wont pass!

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html>
	
        <head>
        <title>PD Cars - Contact Us</title>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
        </head>

	<body background="..\Images\background.jpg">
		<br/>
		<br/>
		<br/>
		<table border="0" align="center" width="600" cellpadding="-10" cellspacing="-1">
					<tr>
					<td><a href="..\Home\home.html"><img src="..\Images\home.gif" alt="Home" border="0" /></a></td>				
					<td><a href="..\About\About.html"><img src="..\Images\about_us.gif" alt="About Us" border="0" /></a></td>		
					<td><a href="..\Stock_List\stock_list.html"><img src="..\Images\stock_list.gif" alt="Stock List" border="0" /></a></td>	
					<td><a href="..\Contact_Us\contact_us.html"><img src="..\Images\contact_us.gif" alt="Contact Us" border="0" /></a></td>	
					<td><a href="..\Links\links.html"><img src="..\Images\links.gif" alt="Links" border="0" /></a></td>
					<td><img src="..\Images\logo.gif" alt="PD Cars" /></td>
					</tr>
		</table>

		<table align="center" width="641">
					
					<tr>
					<td align="center"> 
					<font face="verdana" size="2" color="black">
					
					Please use the below form to contact us, this maybe with regards to a car or just a general 
					enquiry. We aim to respond the same working day.
					
					</font>
					</td>
					</tr>
					
		</table>			
					
					
					
							
		<form method="post" action="mailto:[email protected]">
		<font face="verdana" size="2" color="black">
		<table width="641" align="center">	
						
					  <tr><td>First Name</td><td><input type="text" name="First_Name" size="15" maxlength="25" value="" /></td>

                                           <td>Second Name</td><td><input type="text" name="Second_Name" size="15" maxlength="25" value="" /></td></tr>

					    <tr><td>Address Line 1</td><td><input type="text" name="Address1" size="25" maxlength="25" value="" /></td>

					     <td>Address Line 2</td><td><input type="text" name="Address2" size="25" maxlength="25" value="" /></td></tr>

					      <tr><td>Address Line 3</td><td><input type="text" name="Address3" size="25" maxlength="25" value="" /></td>

					       <td>Postcode</td><td><input type="text" name="Postcode" size="7" maxlength="7" value="" /></td></tr>

					        <tr><td>Telephone Number</td><td><input type="text" name="Telephone" size="11" maxlength="11" value="" /></td>

					         <td>Mobile Number</td><td><input type="text" name="Mobile" size="11" maxlength="11" value="" /></td></tr>

					          <tr><td>Email Address</td><td><input type="text" name="Email" size="30" maxlength="50" value="" /></td></tr>

					           <tr>
						    <td>Nature Of Enquiry</td>
						     <td>
						      <select name="Equiry">
							<option value="sales">Sales</option>
							<option value="general">General</option>
							<option value="directions">Directions</option>
						       </select>
						      </td>
						   </tr>
						   <tr>
						      <td>Enquiry</td>
						      <td>
						        <textarea rows="5" cols="20"></textarea>
						      </td>
						   </tr>
		</table>
						
		
																	
		<table width="80%" align="center">
		<tr>
		<td align="center">
			<input type="submit" value="Submit" />
			<input type="reset" value="Reset" />
		</td>
		</tr>
		
		
		</table>
		</font>
		</form>

 		
		
	     	
		
		<table border="0" align="center" width="641">
					<tr>
					<td align="center"> 
					<font face="verdana" size="2" color="black">
					
					<a href="..\Home\home.html">Home</a>				
					<a href="..\About\About.html">About Us</a>		
					<a href="..\Stock_List\stock_list.html">Stock List</a>	
					<a href="..\Contact_Us\contact_us.html">Contact Us</a>
					<a href="..\Links\links.html">Links</a>
					</font>
						
					<p>
    					<a href="http://validator.w3.org/check?uri=referer"><img
        				src="..\images\valid.gif" border="0"
        				alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>
  					</p>
					
					</td>
					</tr>
					
		</table>
		
		
	</body>
</html>

Btw cant use CSS or anything, needs to be a static website. No java etc.
 
Thats great, but now the font for the labels on the form are in times new roman not verdanna, is it a case of a font tag for each label? I cannot use CSS, a constraint of the assignment.
 
Last edited:
Augmented said:
That a pretty stupid constraint to make, but I guess you're stuck with it. Yes, what you'll have to do is surround every bit of label text with the relevant <font> element.

It'll take a while, be inflexible, and add loads of bloat to your code (hence why CSS would be better).

Yup tell me bout about it, already had this discussion with a web developer at work and a argument with my tutor. Next assignment can use Java, CSS etc.

Cheers tho :)
 
Back
Top Bottom