PDA

View Full Version : Validating HTML


LynxGrr
05-24-2004, 09:31 PM
Hello All,
Ive just attempted to get my new index page validated (something ive never done before) and i reduced the 25 problems down to three. Unfortunatly Im not very up to date on what constitues valid HTML. If anyone could shed some light on the last few I'd appreciate it.

The page is http://lynx.nakedhippy.co.uk/index.html

Thank you in advance

Antoniohawk
05-24-2004, 10:22 PM
<TD VALIGN="top" ALIGN="center" BACKGROUND="images/backdrop.gif">
to
<TD VALIGN="top" ALIGN="center" style="background-image: url(images/backdrop.gif)">

]|V|[agnus
05-24-2004, 11:02 PM
Checking it now, I see one error for a <BODY> element in an area where it is not allowed.

This is simply because you neglected to close the <HEAD> element, in case you haven't figured it out by the time you read this. :)

LynxGrr
05-24-2004, 11:09 PM
Ive been at it for a few hours now, and by removing the closing head tag and the opening body tag, the page validates as HTML 4.01 transitional.... surely this isnt right?

Still... got the badge on the page... for now....

Antoniohawk
05-24-2004, 11:14 PM
Try the following.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Lynx :: Welcome</TITLE>
<LINK REL="stylesheet" TYPE="text/css" href="style.css">
</HEAD>

<BODY>
<MAP NAME="imgmap">
<AREA HREF="javascript:history.back()" SHAPE="poly" COORDS="678,23,694,55,646,40" ALT="Go Back">
<AREA HREF="javascript:history.forward()" SHAPE="poly" COORDS="683,23,736,38,699,55" ALT="Go Forward">
</MAP>



<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" WIDTH="750" ALIGN="center">
<TR>

<TD COLSPAN="2" WIDTH="750"><IMG SRC="images/menu-top3.gif" USEMAP="#imgmap" BORDER="0" ALT=""></TD>
</TR>

<TR>
<TD VALIGN="top" ALIGN="center" STYLE="background-image: url(images/backdrop.gif)">
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" BGCOLOR="#000000">
<TR><TD VALIGN="top" WIDTH="175"><a href="index.html" onMouseOver="document.homepic.src='images/homeo.gif';" onMouseOut="document.homepic.src='images/homeo.gif';"><IMG SRC="images/homeo.gif" BORDER="0" NAME="homepic" HEIGHT="45" WIDTH="175" ALT=""></A></TD></TR>
<TR><TD VALIGN="top" WIDTH="175"><a href="pics.html" onMouseOver="document.picspic.src='images/picsr.gif';" onMouseOut="document.picspic.src='images/pics.gif';"><IMG SRC="images/pics.gif" BORDER="0" NAME="picspic" HEIGHT="44" WIDTH="175" ALT=""></A></TD></TR>
<TR><TD VALIGN="top" WIDTH="175"><a href="interests.html" onMouseOver="document.interestspic.src='images/interestsr.gif';" onMouseOut="document.interestspic.src='images/interests.gif';"><IMG SRC="images/interests.gif" BORDER="0" NAME="interestspic" HEIGHT="44" WIDTH="175" ALT=""></A></TD></TR>
<TR><TD VALIGN="top" WIDTH="175"><a href="gbook.html" onMouseOver="document.gbookpic.src='images/gbookr.gif';" onMouseOut="document.gbookpic.src='images/gbook.gif';"><IMG SRC="images/gbook.gif" BORDER="0" NAME="gbookpic" HEIGHT="44" WIDTH="175" ALT=""></A></TD></TR>

<TR><TD VALIGN="top" WIDTH="175"><a href="links.html" onMouseOver="document.linkspic.src='images/linksr.gif';" onMouseOut="document.linkspic.src='images/links.gif';"><IMG SRC="images/links.gif" BORDER="0" NAME="linkspic" HEIGHT="45" WIDTH="175" ALT=""></A></TD></TR>
<TR><TD VALIGN="top" WIDTH="175"><a href="chat.html" onMouseOver="document.chatpic.src='images/chatr.gif';" onMouseOut="document.chatpic.src='images/chat.gif';"><IMG SRC="images/chat.gif" BORDER="0" NAME="chatpic" HEIGHT="45" WIDTH="175" ALT=""></A></TD></TR>
<TR><TD VALIGN="top" WIDTH="175"><a href="contact.html" onMouseOver="document.contactpic.src='images/contactr.gif';" onMouseOut="document.contactpic.src='images/contact.gif';"><IMG SRC="images/contact.gif" BORDER="0" NAME="contactpic" HEIGHT="44" WIDTH="175" ALT=""></A></TD></TR>
<TR><TD VALIGN="top" WIDTH="175"><IMG SRC="images/menu-bottom.gif" ALT=""></TD></TR>
</TABLE>
</TD>
<TD>
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
<TR><TD BGCOLOR="#ccccff" CLASS="right minpad" ALIGN="center"><A HREF="index.html"><B>home</B></A> <IMG SRC="images/paw.gif" HEIGHT="12" WIDTH="14" ALT=""> <A HREF="">sub-index</A> <IMG SRC="images/paw.gif" HEIGHT="12" WIDTH="14" ALT=""> <A HREF="">bio</A> <IMG SRC="images/paw.gif" HEIGHT="12" WIDTH="14" ALT=""> <A HREF="">curriculum vitae</A> <IMG SRC="images/paw.gif" HEIGHT="12" WIDTH="14" ALT=""> <A HREF="">portfolio</A> <IMG SRC="images/paw.gif" HEIGHT="12" WIDTH="14" ALT=""> <A HREF="">contact</A></TD></TR>

<TR>
<TD HEIGHT="400" BGCOLOR="#ccccff" CLASS="right bigpad" VALIGN="top">
<H1>Welcome...</H1>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... to the personal website of Ian Cozens. Over the coming weeks and months this site will grow and expand, covering various aspects of my social and personal life, by acting as a directory to other sites which I either maintain or view regulary.</P>
<P>Please note, visitors are free to email me, or leave a brief comment on the guestbook. If your looking for a bit of shameless self publicity, then email the address for your site and I will gladly add it to the links page, if you'll do the same in return of course!</P>
<P ALIGN="right">Ian Cozens, Webmaster.</P>
<p>

<a href="http://validator.w3.org/check?uri=referer"><img border="0"
src="http://www.w3.org/Icons/valid-html401"
alt="Valid HTML 4.01!" height="31" width="88"></a>
</p>
</TD>
</TR>
</TABLE>

</TABLE>

<TABLE WIDTH="750" CELLPADDING="0" CELLSPACING="0" ALIGN="center"><TR>
<TD WIDTH="175" VALIGN="top"><a href="index.html" onMouseOver="document.hippypic.src='images/menu-adr.gif';" onMouseOut="document.hippypic.src='images/menu-ad.gif';"><IMG SRC="images/menu-ad.gif" BORDER="0" NAME="hippypic" ALT="" HEIGHT="44" WIDTH="175"></A></TD>
<TD WIDTH="375" BGCOLOR="#ccccff" CLASS="bottom" ALIGN="center"><FONT SIZE="-2">Design and Layout &copy; <A HREF="mailto:lynx@nakedhippy.co.uk" STYLE="font-size: 8pt;">Ian Cozens</A> 2004&nbsp;&nbsp;&nbsp;&nbsp;Hosted by <A HREF="http://www.nakedhippy.co.uk" TARGET="new" STYLE="font-size: 8pt;">www.nakedhippy.co.uk</A><BR>Last Modified : <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">document.write(document.lastModified);</SCRIPT></FONT></TD>

<TD WIDTH="200" BGCOLOR="#ccccff" CLASS="bottom right"><IMG SRC="images/base-trim.gif" ALT="" HEIGHT="43" WIDTH="200"></TD>
</TR>

</TABLE>
</BODY>
</HTML>

LynxGrr
05-24-2004, 11:28 PM
Now that i feel more comfortable with. Thank you very much.

Does anyone have an explanation as to why removing the end HEAD and opening BODY tag would have made any difference?