Give me GOOD HTML snippets please!

Like many blog owners I have a few HTML snippets linking to other sites. For example, everyone and their dog seems to have their own EC drop page nowadays, and in order to be included on it, they want you to paste up a little banner. Topsites and bloglists also have little banners. It seems to be popular for bloggers to include their friend’s avatar or banner. Plus widgets iframes and what have you.

Is it too much to ask that your tiny snippet of HTML you want other sites to copy/paste be “good”? By “good” I mean valid xhtml just for starters.

At the very minimum:

  • NO UPPER CASE! Upper case HTML tags have been deprecated for over a decade!
  • Properly terminate tags, especially the img tag. It needs to be <img whatever /> It won’t pass an XHTML validator if you don’t!
  • Don’t expect my visitors to download graphics from some megaslow graphics farm.
  • Don’t include references to styles that my site won’t have. Use inline styles if you want to style your stuff. Normally inline styles are a bad idea, but the one exception is snippets for export.
  • Finally, (my pet peeve): Include height and width attributes with your graphic. It REALLY REALLY slows down the load of my page if you don’t. You’re entitled to have your page load as slow as you want, but please don’t screw up MINE!

You *WANT* other site owners to include your link, don’t you? Don’t inflict pain on them for their trouble!! Give them code that’s just as clean and sleek as you can make it. Failure to read and heed these guidelines may result in your widget being deleted from my page without warning. Thank you!

1 comment to Give me GOOD HTML snippets please!

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.