how to properly use 1x1px transparent image

I've seen many websites, usually ones with large amounts of images or large resolutions, use this technique. My question is, how do use it properly?

From the articles I've read on here as on other forums and blogs here is my base code:

<div class="container">
  <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=" data-width="1800" data-height="1200">               
  <img src="">

Is this how it is suppose to be set up?