title: Creating a <source> element without a closing tag in Nokogiri
body: <p>Using Nokogiri, I am manually creating <code>&lt;video&gt;</code> and <code>&lt;source&gt;</code> tags. My code looks like this:</p>
  
  <pre><code>mp4_source_tag = html.create_element('source')
  tag.replace(mp4_source_tag)          
  mp4_source_tag['type'] = 'video/mp4'
  mp4_source_tag['src'] = video.mp4_video.url
  </code></pre>
  
  <p>Which produces the following HTML:</p>
  
  <p><code>&lt;source type="video/mp4" src="/system/mp4_videos/1/original/trailer.mp4?1347088365"&gt;&lt;/source&gt;</code></p>
  
  <p>However this is invalid HTML5. The correct output should be:</p>
  
  <p><code>&lt;source type="video/mp4" src="/system/mp4_videos/1/original/trailer.mp4?1347088365"&gt;</code></p>
  
  <p>How would I use Nokogiri to output valid HTML5 without the closing <code>&lt;/source&gt;</code> tag?</p>
  
  <p>The replaced tag was an <code>&lt;img&gt;</code> tag, but that doesn't appear to matter.</p>