Nov 18

On Flickr, I used the script to make a nasty little table based generated deal to display my photos in the sidebar. I know, I shouldn’t be so lazy and I should style out my own, but it rendered okay so why should I fear or fret?

Well, I happened along to validate my site, and lo! Invalid site! Mainly caused by my flickr table generated from Flickr’s “Make a badge”.

Well, it’s super easy to validate it. Add the emboldened lines:

<!-- Start of Flickr Badge -->
<table id="flickr_badge_uber_wrapper" cellpadding="0" cellspacing="10" border="0">
<caption style="display:none;">Flickr Uber Wrapper</caption>
<tr><td>
<table cellpadding="0" cellspacing="10" border="0" id="flickr_badge_wrapper">
<caption style="display:none;">Flickr Badge Wrapper</caption>
<tr>
<td>

<script type="text/javascript" src="http://www.flickr.com/badge_code_v2.gne?count=3&amp;display=latest&amp;size=s&amp;layout=v&amp;source=user&amp;user=######"></script>
</td>
</tr>

</table>
<a href="http://www.flickr.com" id="flickr_www">www.<strong style="color:#3993ff">flick<span style="color:#ff1c92">r</span></strong>.com</a>
</td></tr></table>
<!-- End of Flickr Badge -->

Of course, we should all replace this with divs, but that’s for another day.

Brief explanation: tables require a caption directly after the <table> tag in order to validate. Too, a table requires at least one row and one column in order to validate. Too, you have to replace those & with &amp;. & is an escape character, but &amp; is a literal ampersand. For URLs, you want a literal ampersand, and thus require &amp;.

Popularity: 7% [?]

Share and Enjoy:
  • del.icio.us
  • Digg
  • Reddit
  • TwitThis
  • Google Bookmarks
  • StumbleUpon
  • Facebook
  • E-mail this story to a friend!
  • Print this article!

Leave a Reply




  • Meta