title: How to implement these kinds of style (in pictures below) with HTML & CSS
body: <p>An area with border outside and on the top there is a title with its own border. The content inside are not important.</p>
  
  <p><a href="https://i.stack.imgur.com/ZDtjf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZDtjf.png" alt="enter image description here"></a></p>
  
  <p>And this case:</p>
  
  <p><a href="https://i.stack.imgur.com/ZrHOM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZrHOM.png" alt="enter image description here"></a></p>
  
  <p>Thanks! I really don't know how to describe these styles.</p>