Jump to content

Making My XHTML Code Spot On

Money Maker

Recommended Posts

Ok, hi all, I just registered a little while ago, and this is my first post :) Anyway, I've decided to write up a few XHTML and CSS examples to improve my knowledge and skills on the subject. Here's the code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head><title>Welcome to Unknown.com</title></head><body><div id="bannerspace">	<h2>This is where my banner would go... if I had one</h2></div><div id="welcome">	<p>Welcome to Unknown.com - We hope you find our site informational, and hope you come back again!</p></div><div id="navigation">	<ul>		<li><a href="index.html">Home</a></li>		<li><a href="info.html">Information</a></li>		<li><a href="forums.html">Forums</a></li>		<li><a href="downloads.html">Downloads</a></li>		<li><a href="articles.html">Articles</a></li>	</ul></div><div id="content">	<h1>Welcome to Unknown.com</h1>	<p>We're glad you made it to our site!</p>	<p>Please log in here:</p>	<form method="post" action="www.unknown.com/account-login.html">		<table>			<tr>				<td>Username:</td>				<td><input type="text" name="user" /></td>			</tr>			<tr>				<td>Password:</td>				<td><input type="password" name="pass" /></td>			</tr>			<tr>				<td><input type="submit" name="Login" value="Login!" /></td>			</tr>		</table>	</form></div><div id="advertisers">	<p>If somebody wanted to advertise on this site, the ads would go here!</p></div><div id="small">	<p>© Copyright Unknown.com Community</p></div></body></html>

So, I ran that through the W3 Validator, and got the following message: "The uploaded document "Homepage Test.html" was checked and found to be tentatively valid XHTML 1.0 Strict. This means that with the use of some fallback or override mechanism, we successfully performed a formal validation using an SGML or XML Parser. In other words, the document would validate as XHTML 1.0 Strict if you changed the markup to match the changes we have performed automatically, but it will not be valid until you make these changes."Which I am definitely happy with, seeing as this is my first example; but, I want to get my code spot on, so that I don't get the "it will not be valid until you make these changes" message. Oh, and I know I haven't got a CSS document linking from the XHTML document. Why? Because I haven't actually started the CSS document :) Also, if anybody has any tips or tricks they know, and want to share, then please do!Thanks in advance for everyones help!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...