PDA

View Full Version : Interesting realization regarding compliance


Guest210212002
08-03-2006, 12:42 AM
I recently went through all of my templates and custom code and swapped out every instance of <br> with <br />, so that it's a closed function. What I didn't realize until today after passing my site through W3's validator a few times was that img tags need the same treatment.

For example:

<img src="blah.gif" alt="woohoo"> = Non-compliant
<img src="blah.git" alt="woohoo" /> = compliant

After wondering what the heck it was barking at for so long, I finally realized what it was. Just thought I'd pass it on.

/me is down to under 10 errors on his forum page, and is actually excited about it.

DementedMindz
08-03-2006, 12:48 AM
lol im big on that stuff i keep all my templates Valid XHTML 1.0 Transitional makes the pages load faster too..
hehehe <img src="blah.git" /> = compliant is not compliant also this would be <img src="blah.git" alt="" /> = compliant ;)

Guest210212002
08-03-2006, 01:05 AM
I'm getting a lot more into it lately. I'm down to 7 errors on my forums page (http://www.sevenstring.org/forums/index.php) and around 20 on my portal. It's maddening, I tell you! :D

Edit: alt="Chris is senile" ;)

While I'm at it, what would the correct way to format this be?


<tr><td height="20" colspan="6" background="http://www.sevenstring.org/forum/images/gradient_thead.gif"></td><td><img src="http://www.sevenstring.org/forum/images/clear.gif" alt="" /></td></tr>

DementedMindz
08-03-2006, 01:07 AM
yeah it is it takes time but once you get it you will do your best to keep it that way lol... what did my post make you wonder about it?

your portal page is easy to fix do like i said in my post on your nav add a <tr> before and at the very end add a <tr/>

Guest210212002
08-03-2006, 01:12 AM
Hah, yeah I have to edit all the older ones to include your corrections. :D You've got me on a compliance-rampage now bro. I'm down to 6 errors on my forum link! :D

* Guest210212002 was at 22 an hour ago

DementedMindz
08-03-2006, 01:14 AM
try this usually i do mine different but you dont have yours in a misc directory so try this

<tr><td height="20" colspan="6" style="background-image:url(/forum/images/gradient_thead.gif)"></td><td><img src="/forum/images/clear.gif" alt="" /></td></tr>

yeah its better for spiders when they spider and its better on page speed there is alot of benefits from it... I made sure my whole site was compliant

you have alot of easy fixes its nothing major at all... your missing alot of alt="" with image closing tags alt="" />

Guest210212002
08-03-2006, 01:35 AM
That did it, thanks man! :D Down to 5! :D

Edit: 4!!

* Guest210212002 goes insane

Oh man, I'm never going to get to sleep tonight. :D

Edit: 1!! :D

DementedMindz
08-03-2006, 01:36 AM
no problem I had the same problem and had to fix mine too..

Guest210212002
08-03-2006, 01:44 AM
https://vborg.vbsupport.ru/

Wahoo!!! :D

Thank you very much for the help bro!

DementedMindz
08-03-2006, 01:54 AM
LOL no problem now its time to do your portal page and go through other pages.. Do it for your whole site as it only helps...

Guest210212002
08-03-2006, 01:59 AM
I'm debating going to bed to get up in time for work tomorrow, or going at the portal while I'm on a roll. :D I have a feeling that if I start doing the portal now, I'll just end up with broken front end when I wake up tomorrow. :D

My front page news is random, and it cycles between all the interviews in the left column which I'll have to clean up as well. Tomorrow it is. :D

Thanks again man. Cheers! :D

DementedMindz
08-03-2006, 02:09 AM
LOL no problem yeah it looks fairly easy though on your main page cause you dont have many errors at all...

SaintDog
08-03-2006, 04:47 AM
If you're working on SevenString.org, then on the forumhome, you just need to get rid of the <font> tags and replace them with something such as <span style="font-size: .70em; font-family: verdana, arial, sans-serif;"></span>.

I'm sitting looking at 3 there and about 17 on the portal, though the ones on the portal are actually rather small so you shouldn't have too much trouble there :).

DementedMindz
08-03-2006, 04:59 AM
Why? Its not even a error... Mostly all of his errors on his portal are for not having alt tags and not closing the image.. His other ones are for the site nav on his site and then he would have like one or 2 errors after that but nothing with font.. I know thats how they should be done but I think he rather get it Valid XHTML 1.0 Transitional before he even goes that far cleaning the html codes up...

http://validator.w3.org/check?uri=http%3A%2F%2Fsevenstring.org%2F

Failed validation, 18 errors

Freesteyelz
08-03-2006, 05:02 AM
The W3C standard is to use <span style...>. :)

SaintDog
08-03-2006, 05:05 AM
If you're going to go through the trouble of validating your pages' coding structure, why not validate them to be 100% compliant? The <font> tag is depreciated, hence why it should be replaced for standards compliance.