<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <div id="element1">content-box</div>
  <div id="element2">border-box</div>
</body>
</html>
#element1 {
  width: 300px;
  height: 200px;
  background: #f9a73e;
  margin: 30px;
  padding: 15px;
  border: 3px solid #000;
  box-sizing: content-box;
}

#element2 {
  width: 300px;
  height: 200px;
  background: #9de265;
  margin: 30px;
  padding: 15px;
  border: 3px solid #000;
  box-sizing: border-box;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.