Jump to content

Archived

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

MoFish

couple errors, needing help

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]

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
To fix a couple of them, HREF should be replaced by href, and & should be replaced by &amp;

EDIT: Beaten, anyway, you need to put alt="something" in your img tag

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Are you [b]sure [/b]you're looking at the same source that is being validated?

There are no lines in the source being validated that look like the ones you posted.

Ken

Share this post


Link to post
Share on other sites
i was looking at the wrong line ;) shhh! dont say a word! i feel stupid enough! down to one error now

Error Line 73, column 126: required attribute "alt" not specified .

<img src='gallery/tn_mr_bean1.jpg' /></a></div>

Share this post


Link to post
Share on other sites
So add the alt attribute in.
[code]<img src='gallery/tn_mr_bean1.jpg' alt='some discriptive phrase' /></a></div>[/code]

Ken

Share this post


Link to post
Share on other sites

×

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.