title: Width of html text element when break line
body: <p>I have a problem with width of a text container. </p>
  
  <p>I want to achive something like this:</p>
  
  <p><a href="https://i.stack.imgur.com/IRMH1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IRMH1.png" alt="image"></a> </p>
  
  <p>When is red line I want end of <code>p</code>'s width. In this example width of p should be about 250px, not 100% of table (300px).<br>
  When text is in one line everything is ok</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>p{
    border: 1px solid black;
    display: inline-block;
  }
  table{
     width: 300px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;table&gt;
    &lt;tr&gt;
      &lt;td&gt;
        &lt;div&gt;
          &lt;p&gt;texttext textfdftext texttexttexttext texttexttexttext&lt;/p&gt;
        &lt;/div&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>