<div class="img-wrap">
<img src="https://i.imgur.com/7PfhoY4.jpg" alt="">
  階層式樣式表(英語:Cascading Style Sheets,縮寫:CSS;又稱串樣式列表、級聯樣式表、串接樣式表、階層式樣式表)是一種用來為結構化文件(如HTML文件或XML應用)添加樣式(字型、間距和顏色等)的電腦語言,由W3C定義和維護。
</div>
.img-wrap{
  border: 1px solid #ccc;
  display: inline-block;
  width:min-content;
}
img{
  width: 200px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.