cara menambahkan garis putus -putus setelah dan sebelum teks di CSS

.horizontal_dotted_line {
  display: flex;
  width: 300px;
  border-right: 1px solid black;
  border-left: 1px solid black;
  padding: 5px;
} 
.horizontal_dotted_line:after {
  border-bottom: 1px dotted black;
  content: '';
  flex: 1;
}
.horizontal_dotted_line:before {
  border-bottom: 1px dotted black;
  content: '';
  flex: 1;
}
Unsightly Unicorn