Jump to content

couple errors, needing help


MoFish

Recommended Posts

hey. I just ran the w3 validator check on my site and have got 4 errors which i cant seem to get rid of. im trying to resolve them but i dont understand exactly how to get rid of them. here is a link to the errors im getting. [a href=\"http://validator.w3.org/check?uri=http%3A%2F%2Fmo.dotgeek.org%2F&charset=%28detect+automatically%29&doctype=Inline\" target=\"_blank\"]click here[/a]. can anyone help me clear them up?

Thanks Again, Mofish

[code]
<td width='70%'><a href='index.php?page=viewgallery&amp;category=$category'><b>$category Gallery</b> - Click Here To View</a></td>

<td width='30%' class='right-align'><a href='index.php?page=viewgallery&amp;category=$category'><img src='gallery/tn_$image' /></a></td>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/7616-couple-errors-needing-help/
Share on other sites

[code]<div class='random-image'><a HREF='index.php?page=viewgallery&category=Random'><img src='gallery/tn_mr_bean1.jpg' /></a></div> [/code]

Change to:
[code]<div class='random-image'><a href='index.php?page=viewgallery&amp;category=Random'><img src='gallery/tn_mr_bean1.jpg' /></a></div> [/code]

That should clear all your errors.
Are you viewing it through the source code? this is the code im trying to play around with. I have href in small, and am using &amp;

[code]

echo"<table width='100%' border='0' cellspacing='0'>
<tr>

<td width='70%'><a href='index.php?page=viewgallery&amp;category=$category'><b>$category Gallery</b> - Click Here To View</a></td>
                                        
<td width='30%' class='right-align'><a href='index.php?page=viewgallery&amp;category=$category'><img src='gallery/tn_$image' /></a></td>

</tr>";

[/code]
The link you gave to the validator output (as well as the online code itself) are both the same. They use HREF (incorrect) and should be href, they have an image alt tag missing, and they pass a parameter in the link using & which needs to be &amp; which is what causes all the errors on line 73.

If you fix those online and revalidate there should not be any errors.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.