Jump to content

Recommended Posts

Wasnt sure if this was the right place to post this, but i try to validate my code using w3 validator. And i get errors.

Was wondering if anyone could help me

below is my code

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

            "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<title>Tedley's Fishing Chaters > home</title>

<script language="JavaScript" type="text/JavaScript">

<!--

function MM_swapImgRestore() { //v3.0

  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;

}

 

function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}

}

 

function MM_findObj(n, d) { //v4.01

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}

 

function MM_swapImage() { //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

  if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}

//-->

</script>

<meta name="" content="teds">

</head>

 

<body bgcolor="#E5E5E5" onLoad="MM_preloadImages('home_tabyellow.png','aboutus_tabyellow.png','login_tabyellow.png','contactus_tabyellow.png','shopping_tabellow.png')">

<div align="center">

 

  <table width="834" height="639" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#0033FF">

    <!-- MSTableType="layout" -->

    <tr align="center">

      <td height="84" valign="top" bgcolor="#FFFFFF"><img src="fish.png" width="140" height="84" align="top">

      </td>

      <td height="84" colspan="7" valign="top" bgcolor="#FFFFFF"><div align="left"><img src="../../Desktop/Tedlys%20fishing%20charters/banner4.gif" width="655" height="84"></div></td>

    </tr>

    <tr>

      <td width="181" height="586" rowspan="2" valign="top" bgcolor="#FFFFFF">

        <img src="sidetab1.png" width="181" height="586" align="top"></td>

      <td width="93" height="23" valign="top" bgcolor="#FFFFFF"><a href="index6.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('home','','home_tabyellow.png',1)"><img src="home_tab.png" alt="home" name="home" width="93" height="23" border="0"></a></td>

      <td width="93" valign="top" bgcolor="#FFFFFF"><a href="aboutus.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('about us','','aboutus_tabyellow.png',1)"><img src="aboutus_tab.png" alt="about us" name="about us" width="93" height="23" border="0"></a></td>

      <td width="93" valign="top" bgcolor="#FFFFFF"><a href="shopping.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('shopping','','shopping_tabellow.png',1)"><img src="shopping_tab.png" alt="shopping" name="shopping" width="93" height="23" border="0"></a></td>

      <td width="93" valign="top" bgcolor="#FFFFFF"><a href="contactus.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('contact us','','contactus_tabyellow.png',1)"><img src="contactus_tab.png" alt="contact us" name="contact us" width="93" height="23" border="0"></a></td>

      <td width="93" valign="top" bgcolor="#FFFFFF"><a href="login.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('login','','login_tabyellow.png',1)"><img src="login_tab.png" alt="login" name="login" width="93" height="23" border="0"></a></td>

      <td width="187" valign="top" bgcolor="#FFFFFF"><img src="rightshift_tab.png" width="187" height="23"></td>

      <td width="1" valign="top" bgcolor="#FFFFFF"> </td>

    </tr>

    <tr>

      <td height="532" colspan="7" valign="top" bgcolor="#FFFFFF">

        <table width="651" height="646" border="0" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF">

          <!-- MSTableType="layout" -->

          <tr bgcolor="#FFFFFF">

            <td height="55" colspan="3" valign="top">

              <div align="left"> 

                 </div></td>

          </tr>

          <tr bgcolor="#FFFFFF">

            <td height="72" colspan="3" valign="top">

              <div align="center"><img src="conceptbanner1.png" width="599" height="58" align="absbottom"></div></td>

          </tr>

          <tr bgcolor="#FFFFFF">

            <td width="38" height="358" valign="top">

              <div align="center"></div>

              <p align="center"></p></td>

            <td width="349" valign="top"><div align="center">

                <p align="right"><font size="4" face="Agency FB"><strong><font size="5">W</font></strong>elcome

                  to Tedley's fishing charters, the biggest Marine boutique situated

                  in Melbournes prestigous location. Our Docklands showroom is

                  located on Lorinmer water front with hundreds of new and used

                  boats, complete angling equipment, personal watercraft, watersports

                  and dive equipment, expert sales staff, and a comfortably air

                  conditioned showroom complete with licensed “Splash” café.</font>

                </p>

              </div>

              <p align="right"><font size="4" face="Agency FB">Do yourself a huge

                favour and have "Uncle Ted Expirence" Like everyone

                else who’s come to visit us, you’ll be amazed and impressed by

                the range of supply and the enormity of our World...... </font></p>

              <div align="right">

                <p> </p>

                <p><font size="4" face="Agency FB"><strong>Tedley's Fishing Charters.</strong></font></p>

              </div></td>

            <td width="248" valign="top"><p align="center"><img name="" src="docks5.jpg" width="200" height="354" alt="docklands showroom"></p>

              </td>

          </tr>

          <tr bgcolor="#FFFFFF">

            <td height="154" colspan="3" valign="top"> </td>

          </tr>

        </table>

      </td>

    </tr>

  </table>

</div>

 

</body>

 

</html>

Link to comment
https://forums.phpfreaks.com/topic/69891-solved-validating-html-to-xhtml/
Share on other sites

Ahh sorry for the double post i forgot to put in it code. And it was to late to edit. Sorry for the incovience ::). Im never new to this and having a real trouble getting it to work. I can understand it ok i guess but i will still get errors.

That is my HTML code

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
            "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Tedley's Fishing Chaters > home</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<meta name="teds" content="teds">
</head>

<body bgcolor="#E5E5E5" onLoad="MM_preloadImages('home_tabyellow.png','aboutus_tabyellow.png','login_tabyellow.png','contactus_tabyellow.png','shopping_tabellow.png')">
<div align="center">

  <table width="834" height="639" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#0033FF">
    <!-- MSTableType="layout" -->
    <tr align="center"> 
      <td height="84" valign="top" bgcolor="#FFFFFF"><img src="fish.png" width="140" height="84" align="top"> 
      </td>
      <td height="84" colspan="7" valign="top" bgcolor="#FFFFFF"><div align="left"><img src="banner4.gif" width="655" height="84"></div></td>
    </tr>
    <tr> 
      <td width="181" height="586" rowspan="2" valign="top" bgcolor="#FFFFFF"> 
        <img src="sidetab1.png" width="181" height="586" align="top"></td>
      <td width="93" height="23" valign="top" bgcolor="#FFFFFF"><a href="index6.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('home','','home_tabyellow.png',1)"><img src="home_tab.png" alt="home" name="home" width="93" height="23" border="0"></a></td>
      <td width="93" valign="top" bgcolor="#FFFFFF"><a href="aboutus.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('about us','','aboutus_tabyellow.png',1)"><img src="aboutus_tab.png" alt="about us" name="about us" width="93" height="23" border="0"></a></td>
      <td width="93" valign="top" bgcolor="#FFFFFF"><a href="shopping.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('shopping','','shopping_tabellow.png',1)"><img src="shopping_tab.png" alt="shopping" name="shopping" width="93" height="23" border="0"></a></td>
      <td width="93" valign="top" bgcolor="#FFFFFF"><a href="contactus.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('contact us','','contactus_tabyellow.png',1)"><img src="contactus_tab.png" alt="contact us" name="contact us" width="93" height="23" border="0"></a></td>
      <td width="93" valign="top" bgcolor="#FFFFFF"><a href="login.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('login','','login_tabyellow.png',1)"><img src="login_tab.png" alt="login" name="login" width="93" height="23" border="0"></a></td>
      <td width="187" valign="top" bgcolor="#FFFFFF"><img src="rightshift_tab.png" width="187" height="23"></td>
      <td width="1" valign="top" bgcolor="#FFFFFF"> </td>
    </tr>
    <tr> 
      <td height="532" colspan="7" valign="top" bgcolor="#FFFFFF"> 
        <table width="651" height="646" border="0" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF">
          <!-- MSTableType="layout" -->
          <tr bgcolor="#FFFFFF"> 
            <td height="55" colspan="3" valign="top"> 
              <div align="left">  
                 </div></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="72" colspan="3" valign="top"> 
              <div align="center"><img src="conceptbanner1.png" width="599" height="58" align="absbottom"></div></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td width="38" height="358" valign="top"> 
              <div align="center"></div>
              <p align="center"></p></td>
            <td width="349" valign="top"><div align="center">
                <p align="right"><font size="4" face="Agency FB"><strong><font size="5">W</font></strong>elcome 
                  to Tedley's fishing charters, the biggest Marine boutique situated 
                  in Melbournes prestigous location. Our Docklands showroom is 
                  located on Lorinmer water front with hundreds of new and used 
                  boats, complete angling equipment, personal watercraft, watersports 
                  and dive equipment, expert sales staff, and a comfortably air 
                  conditioned showroom complete with licensed “Splash” café.</font> 
                </p>
              </div>
              <p align="right"><font size="4" face="Agency FB">Do yourself a huge 
                favour and have "Uncle Ted Expirence" Like everyone 
                else who’s come to visit us, you’ll be amazed and impressed by 
                the range of supply and the enormity of our World...... </font></p>
              <div align="right">
                <p> </p>
                <p><font size="4" face="Agency FB"><strong>Tedley's Fishing Charters.</strong></font></p>
              </div></td>
            <td width="248" valign="top"><p align="center"><img name="" src="docks5.jpg" width="200" height="354" alt="docklands showroom"></p>
              </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="154" colspan="3" valign="top"> </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</div>

</body>

</html>

 

I broke it down to these errors

Result:  	 Failed validation, 8 Errors
File:	upload://Form Submission
Encoding:	utf-8
Doctype:	HTML 4.01 Transitional
Root Element: 	HTML

↑ Top
Validation Output: 8 Errors
1.Error  Line 40, Column 28: there is no attribute "HEIGHT".

  <table width="834" height="639" border="0" align="center" cellpadding="0" cell

2.Error  Line 40, Column 104: there is no attribute "BORDERCOLOR".

…ding="0" cellspacing="0" bordercolor="#0033FF">

3.Line 43, Column 108: required attribute "ALT" not specified.

…" width="140" height="84" align="top"> 

4.Line 45, Column 129: required attribute "ALT" not specified.

…"banner4.gif" width="655" height="84"></div></td>

5.Line 49, Column 68: required attribute "ALT" not specified.

…idetab1.png" width="181" height="586" align="top"></td>

6.Line 55, Column 106: required attribute "ALT" not specified.

…hift_tab.png" width="187" height="23"></td>

7.Line 69, Column 104: value of attribute "ALIGN" cannot be "ABSBOTTOM"; must be one of "TOP", "MIDDLE", "BOTTOM", "LEFT", "RIGHT".

…th="599" height="58" align="absbottom"></div></td>

8.Line 69, Column 105: required attribute "ALT" not specified.

…h="599" height="58" align="absbottom"></div></td>

 

i had 22 errors.

But this is as far as i got. Please help!!

Thanks in advance

i can somone explain why im getting the alt error

i dont understand it.

ive noticed alot of my errors have been coming from attritubutes. As i may have said im very new to this HTML to XHTML thing. And i need to get this done. Would anyone have Msn or aim or something?

 

Sorry dude but this stuff is straight forward...

 

when it says stuff like '2.Error  Line 40, Column 104: there is no attribute "BORDERCOLOR".' that means you have used bordercolor and its not valid!!!

 

if the parser is highlighting a '>' it could be you are not using singleton tags - where the elemnet has no closing element you should finish teh tage with ' />' or it may be an error in the markup just before that '>'.

 

rule of thumb - tags should ONLY contain id's or classes unless they are interactive elements (form elements or those that specify external sources like img, iframe(hate them) etc.

i can somone explain why im getting the alt error

i dont understand it.

 

Example really bad html

<img src=happy.gif>

 

Example much better - with attributes properly quoted

<img src="happy.gif" width="30" height="30" alt="big smile" border="0">

 

Example for xHTML

<img src="happy.gif" width="30" height="30" alt="" border="0"/>

Which browser do you primarily code in? I think Firefox + HTML Validator add-on is essential. As you code and make changes, you have an icon in the lower right that shows the compliance of the page you're currently viewing. It's pretty detrimental and counter-productive to continue coding while the page has errors. You'll save yourself a lot of time to validate as you go.

 

I also use the IE Tab add-on, which lets me switch between Firefox and IE rendering within the Firefox browser. Really handy for a quick glance at your page(s) through the shoddy eyes of IE6 (the add-on uses whatever version of IE you have installed).

the attribuet is not valid in xhtml. browser will still read it and render but if there were a browser that FORCED complance it would fail. height, width, border, margin, padding background, colour etc etc etc are style related and as such should be in your css NOT your html. ANYTHINg to do with how teh element should look should be in your style sheet

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.