title: constraining web content within a fixed size
body: <p>I have a piece of html. i want to embed that html into a pair of  tags on my own web page. the html code is not known in advance. it is obtained dynamically. this html code can contain anything, normally images and texts and youtube videos. </p>
  
  <p>the problem is that i want to embed the content into a fix size . the size is specified with width and height in pixels. if the content has large images, i want to resize the image as well as other content with a same factor such that the whole content can fit into the specified size. everything is still in proportion.</p>
  
  <p>i don't want scrollbar either. i don't know how to do this. I'm familiar with html but not much with CSS. I have searched the web trying to find examples of other people implement this. I couldn't find any.</p>
  
  <p>do you know how to do this?</p>