title: How can I create this block of HTML code using JavaScript
body: <p>I want to create this block of HTML code by using JavaScript, how can I do 
     this?</p>
  
  <pre><code>&lt;a&gt;
  &lt;span class="image"&gt;&lt;img src="&lt;%=request.getContextPath() 
  %&gt;/resources/build/images/cogs.jpg" alt="Profile Image" width="100"&gt; 
  &lt;/span&gt;
  &lt;span&gt;
  &lt;span id="timeDiv2"&gt;&lt;/span&gt;
  &lt;span class="time" id="timeDiv3"&gt;&lt;/span&gt;
  &lt;/span&gt;
  &lt;span class="message" id="timeDiv4"&gt;
  &lt;/span&gt;
  &lt;/a&gt;
  </code></pre>