title: Add text to a <p> tag by using the ID of the body tag in JavaScript
body: <p>I want to insert some text in a <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p" rel="nofollow noreferrer">paragraph</a>
  tag, but here the paragraph tag doesn't have an ID. So, using the ID of the body tag I want to insert text. How can I do that?</p>
  <p>Following is my HTML code:</p>
  <pre><code>&lt;html&gt;
      &lt;head xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
          &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=7&quot;&gt;
          &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt;
      &lt;/head&gt;
  
      &lt;body dir=&quot;ltr&quot; id=&quot;tinymce&quot; class=&quot;mceContentBody &quot; contenteditable=&quot;true&quot;&gt;
          &lt;p&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/p&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>Now, I want to add text using JavaScript in the <em>p</em> tag.</p>
  <p>I want that text to come from another variable. Is it possible using <a href="https://en.wikipedia.org/wiki/JQuery" rel="nofollow noreferrer">jQuery</a>?</p>