Cara Menampilkan ... Setelah beberapa karakter panjang JS HTML H1

/*Css*/

.text {
  display: block;
  width: 100px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* html */
<span class="text">Hello world this is a long sentence</span>
Wandering Wryneck