title: How do I dynamically append a large block of HTML to a div?
body: <p>I'm trying to learn web development, so I don't have much experience with the various languages and markups yet. I'm making a website with a blog that reads JSON data from the Tumblr v2 API. After getting the JSON data from Tumblr I want to add some of the data from each post to my own website's blog, here's the code that I've been trying to use..</p>
  
  <pre><code>&lt;script&gt;
  function loadBlogPosts(){
  $.getJSON("http://api.tumblr.com/v2/blog/[MY_BLOG]/info?api_key=[MY_KEY]",
      function(blogData){
          $.each(blogData.posts, function(){
               $(#main_content).append( [BUNCH OF NESTED HTML] );
          });
      }
  );
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>Before writing this, I thought it would be a good idea to make a 'layout' of each blog post in divs. So i came up with this:</p>
  
  <pre><code>&lt;div class="post"&gt;
      &lt;div class="post_header"&gt;
          &lt;div class="post_title"&gt;&lt;/div&gt;
          &lt;div class="post_author"&gt;&lt;/div&gt;
          &lt;div class="post_date"&gt;&lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="post_content"&gt;&lt;/div&gt;
      &lt;div class="post_footer"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>But that's where I'm stuck. I know what I want to do, but I don't have enough experience with JavaScript/JQuery/JSON/HTML to know how to do it. I want parse the JSON blog data and, for each post, take the post content and apply it to that div structure while writing/appending it to the "main_content" div.. I tried copy-pasting that group of divs into the append function surrounded by quotes, but it became a real mess of quotes and slashes, and it didn't look like it was working correctly..</p>
  
  <p>So, whats the best way for me to do that? Is there a good way of applying a big chunk of nested HTML elements while populating them with content from my JSON data? If not, what should I do? I'm still very new to HTML, JavaScript, and web coding in general, so I may be going about this completely wrong!</p>